[SCM] libbluray/master: Build JAR file only if we're building Arch: all packages

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Sun Feb 9 21:15:11 UTC 2014


The following commit has been merged in the master branch:
commit f4b349a28a8ca64a0c16686b7e5edda1bf19c813
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Sun Feb 9 20:37:43 2014 +0100

    Build JAR file only if we're building Arch: all packages
    
    libbluray.jar is shipped in an Arch: all package and does not need to be built
    on every buildd. Add a patch to be able to enable/disable building of the JAR
    file via options to configure.
    
    Furthermore this should allow us to build with BD-J support on all platforms.

diff --git a/debian/control b/debian/control
index 9ce5aa1..e58dde3 100644
--- a/debian/control
+++ b/debian/control
@@ -10,17 +10,17 @@ Uploaders: Andres Mejia <amejia at debian.org>,
 Build-Depends: debhelper (>= 9),
                dh-autoreconf,
                pkg-config,
-               javahelper [linux-any],
-               default-jdk [linux-any],
-               ant [linux-any],
+               default-jdk,
+               javahelper,
                libfreetype6-dev,
                libxml2-dev
-Build-Depends-Indep: doxygen,
+Build-Depends-Indep: ant,
+                     doxygen,
                      texlive-latex-base,
                      texlive-latex-recommended,
                      texlive-latex-extra,
                      latex-xcolor,
-                     texlive-fonts-recommended,
+                     texlive-fonts-recommended
 Standards-Version: 3.9.5
 Homepage: http://www.videolan.org/developers/libbluray.html
 Vcs-Git: git://anonscm.debian.org/pkg-multimedia/libbluray.git
diff --git a/debian/patches/03_split-jar-build-for-arch-all.patch b/debian/patches/03_split-jar-build-for-arch-all.patch
new file mode 100644
index 0000000..ce84100
--- /dev/null
+++ b/debian/patches/03_split-jar-build-for-arch-all.patch
@@ -0,0 +1,70 @@
+Description: Add extra argument to enable building of JAR files
+ The JAR file is shipped in an Architecture: all package so only needs to be
+ built once. This patch adds an extra argument to enable/disabling building of
+ the JAR file seperatly from the BD-Java support.
+Author: Sebastian Ramacher <sramacher at debian.org>
+Forwarded: not-needed
+Last-Update: 2014-02-09
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -80,6 +80,12 @@
+   [use_bdjava=$enableval],
+   [use_bdjava=no])
+ 
++AC_ARG_ENABLE([bdjava-jar],
++  [AS_HELP_STRING([--enable-bdjava-jar],
++  [enable JAR file for BD-Java support (default is no)])],
++  [use_bdjava_jar=$enableval],
++  [use_bdjava_jar=no])
++
+ AC_ARG_WITH([libxml2],
+   [AS_HELP_STRING([--without-libxml2], [build without libxml2 support @<:@default=with@:>@])])
+ 
+@@ -199,6 +205,7 @@
+   AC_DEFINE_UNQUOTED([JDK_HOME], ["$JDK_HOME"], [""])
+ fi
+ AM_CONDITIONAL([USING_BDJAVA], [ test $use_bdjava = "yes" ])
++AM_CONDITIONAL([USING_BDJAVA_BUILD_JAR], [ test $use_bdjava_jar = "yes" ])
+ 
+ dnl BD-J type
+ if test "$BDJ_TYPE" = "j2me"; then
+@@ -240,6 +247,7 @@
+ echo "  BD-J support:                  $use_bdjava"
+ if [[ $use_bdjava = "yes" ]]; then
+ echo "  BD-J type:                     $BDJ_TYPE"
++echo "  build JAR:                     $use_bdjava_jar"
+ if test x"$BDJ_BOOTCLASSPATH" != x""; then
+ echo "  BD-J bootclasspath:            $BDJ_BOOTCLASSPATH"
+ fi
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -127,10 +127,12 @@
+ 	util/log_control.h
+ 
+ if USING_BDJAVA
++if USING_BDJAVA_BUILD_JAR
+ jardir=$(libdir)/libbluray/
+ jar_DATA=$(top_builddir)/src/.libs/libbluray.jar
+ 
+ $(top_builddir)/src/.libs/libbluray.jar: all-local
++endif
+ 
+ libbluray_la_SOURCES += \
+ 	libbluray/bdj/bdj.h \
+@@ -154,6 +156,7 @@
+ 
+ AM_CFLAGS += $(BDJAVA_CFLAGS)
+ 
++if USING_BDJAVA_BUILD_JAR
+ all-local:
+ 	ant -f $(top_srcdir)/src/libbluray/bdj/build.xml \
+ 	    -Dbuild='$(abs_builddir)/libbluray/bdj/build' \
+@@ -167,6 +170,7 @@
+ 	    -Ddist='$(abs_builddir)/.libs' \
+ 	    clean
+ endif
++endif
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libbluray.pc
diff --git a/debian/patches/series b/debian/patches/series
index 19f4e0c..41a5095 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 01_java-compat.patch
 02_online-image.patch
+03_split-jar-build-for-arch-all.patch
diff --git a/debian/rules b/debian/rules
index c688ac4..29aadde 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,36 +1,29 @@
 #!/usr/bin/make -f
 
-DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
-
-confflags := --with-libxml2 --with-freetype
-
-# enable bdjava on linux hosts only
-ifneq (,$(findstring linux,$(DEB_BUILD_ARCH_OS)))
+confflags = --with-libxml2 --with-freetype --enable-bdjava --with-bdj-type=j2se
+# --enable-bdjava-jar is introduced by 03_split-jar-build-for-arch-all.patch.
+# This enables us to build the JAR file only if the Architecture: all package
+# libbluray-bdj is built.
+confflags_java = --enable-bdjava-jar
 
 # Use default java implementation
-JAVA_HOME=/usr/lib/jvm/default-java
-ifeq (,$(wildcard $(JAVA_HOME)))
-     $(info "warning: No suitable jni.h was found. Package will most probably FTBFS!")
-endif
-
-export JDK_HOME=$(JAVA_HOME)
-$(info Located java at $(JAVA_HOME))
-confflags += --enable-bdjava --with-bdj-type=j2se
+export JDK_HOME=/usr/lib/jvm/default-java
+ifeq (,$(wildcard $(JDK_HOME)))
+    $(info "warning: No suitable jni.h was found. Package will most probably FTBFS!")
 endif
 
 # Set CFLAGS to DEB_CFLAGS
 CFLAGS=$(shell dpkg-buildflags --get CFLAGS 2>/dev/null | sed -e 's/-O2//g')
 
-ifneq (,$(findstring linux,$(DEB_BUILD_ARCH_OS)))
 %:
 	dh $@ --parallel --with javahelper,autoreconf
-else
-%:
-	dh $@ --parallel --with autoreconf
-endif
 
 override_dh_auto_configure:
+ifneq (,$(findstring libbluray-bdj,$(shell dh_listpackages)))
+	dh_auto_configure -- $(confflags) $(confflags_java)
+else
 	dh_auto_configure -- $(confflags)
+endif
 
 override_dh_auto_build-indep:
 	make doxygen-doc

-- 
libbluray packaging



More information about the pkg-multimedia-commits mailing list