[pkg-db-commits] [SCM] UNNAMED PROJECT branch, debian-sid, updated. debian/5.1.25-8-6-g3361858
Ondřej Surý
ondrej at sury.org
Fri Apr 22 13:26:18 UTC 2011
The following commit has been merged in the debian-sid branch:
commit 8793e8fb4836a630c8208794b34450defbecd8af
Author: Ondřej Surý <ondrej at sury.org>
Date: Fri Apr 22 07:40:06 2011 +0200
Rewrite debian/rules to use ENABLE_JAVA and ENABLE_GCJ
diff --git a/debian/rules b/debian/rules
index 31ae721..90b61db 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,17 +19,26 @@ DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-JAVA_BROKEN_ARCHS = mips
-GCJ_BROKEN_ARCHS = ia64 sparc mips
+# Don't try to build this file if missing
+/usr/share/gcj/debian_defaults /usr/share/javahelper/java-vars.mk:
+ :
-include /usr/share/gcj/debian_defaults
-include /usr/share/javahelper/java-vars.mk
+JAVA_BROKEN_ARCHS = mips
+GCJ_BROKEN_ARCHS = ia64 sparc mips
GCJ_NATIVE_ARCHS = $(filter-out $(GCJ_BROKEN_ARCHS), $(gcj_native_archs))
-# Don't try to build this file if missing
-/usr/share/gcj/debian_defaults /usr/share/javahelper/java-vars.mk:
- :
+ENABLE_JAVA=no
+ENABLE_GJ=no
+
+ifeq (,$(filter $(DEB_HOST_ARCH), $(JAVA_BROKEN_ARCHS)))
+ENABLE_JAVA=yes
+ifneq (,$(filter $(DEB_HOST_ARCH), $(GCJ_NATIVE_ARCHS)))
+ENABLE_GCJ=yes
+endif
+endif
CONFIGURE_SWITCHES = --prefix=/usr \
--mandir=\$${prefix}/share/man \
@@ -51,23 +60,21 @@ ifeq (zavr32-linux-gnuz,z$(DEB_HOST_GNU_TYPE)z)
CONFIGURE_SWITCHES += --enable-posixmutexes
endif
+ifeq (yes,$(ENABLE_JAVA))
JAVA_HOME ?= /usr/lib/jvm/default-java
CFLAGS += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
-
-ifeq (,$(filter $(DEB_HOST_ARCH), $(JAVA_BROKEN_ARCHS)))
-#enable java
CONFIGURE_SWITCHES += --enable-java
DH_PLUGINS += --with=javahelper
-# don't build java-gcj package on non-native or broken archs
-ifeq (,$(filter $(DEB_HOST_ARCH), $(GCJ_NATIVE_ARCHS)))
-DH_OPTIONS += -Nlibdb5.1-java-gcj
-endif
else
-#disable java
CONFIGURE_SWITCHES += --disable-java
DH_OPTIONS += -Nlibdb5.1-java -Nlibdb5.1-java-dev -Nlibdb5.1-java-gcj
endif
+ifeq (no,$(ENABLE_GCJ))
+DH_OPTIONS += -Nlibdb5.1-java-gcj
+endif
+
+
BROKEN_CPUS = zs390z
VERY_BROKEN_CPUS = zm68kz zhppaz
BROKEN_SYSTEMS = zgnuz
@@ -143,9 +150,9 @@ override_dh_clean:
DH_OPTIONS="" dh_clean
override_jh_installlibs:
-ifeq (,$(filter $(DEB_HOST_ARCH), $(JAVA_BROKEN_ARCHS)))
+ifeq (yes,$(ENABLE_JAVA))
jh_installlibs
-ifneq (,$(filter $(DEB_HOST_ARCH), $(GCJ_NATIVE_ARCHS)))
- dh_nativejava
endif
+ifeq (yes,$(ENABLE_GCJ))
+ dh_nativejava
endif
--
UNNAMED PROJECT
More information about the pkg-db-commits
mailing list