[swt-gtk] 07/13: Adapted the build to the upstream source layout

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu Oct 19 22:58:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master-4.3
in repository swt-gtk.

commit d85ad78cfca7bb89fa51f3f342fc49d2078e0466
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Thu Oct 19 23:27:44 2017 +0200

    Adapted the build to the upstream source layout
---
 debian/Makefile                | 32 -------------------
 debian/changelog               |  1 +
 debian/clean                   |  5 +++
 debian/control                 |  2 +-
 debian/copyright               | 37 +++++++++++-----------
 debian/libswt-gtk-4-java.links |  5 +--
 debian/libswt-gtk-4-java.poms  |  2 +-
 debian/rules                   | 71 ++++++++++++++++++++++--------------------
 8 files changed, 67 insertions(+), 88 deletions(-)

diff --git a/debian/Makefile b/debian/Makefile
deleted file mode 100644
index 299c268..0000000
--- a/debian/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-RELEASE=$(strip $(shell dpkg-parsechangelog | grep Version: | cut -d: -f2 | cut -d- -f1 | cut -d~ -f1))
-JAVA=swt-gtk-$(RELEASE).jar
-CLEANFILES=*.files *.jar *-stamp
-
-JAR=fastjar
-JAVAC=javac -classpath . -source 1.7 -target 1.7
-RM=rm -f
-
-all: $(JAVA)
-	$(MAKE) -f make_linux.mak make_atk make_awt make_cairo make_glx \
-		make_gnome make_swt make_webkit
-	rm -f *.o
-	GTK_VERSION=2.0 $(MAKE) -f make_linux.mak make_swtpi
-
-clean distclean:
-	$(RM) $(CLEANFILES)
-	$(RM) -r swt-gtk-$(RELEASE)
-	-$(MAKE) -f make_linux.mak clean
-
-.PHONY: all clean distclean
-
-swt-gtk-$(RELEASE).files:
-	find org -name *.java -o -name *.properties | sort > $@
-
-%-stamp: %.files
-	mkdir -p $*
-	grep \.java $< | xargs -r $(JAVAC) -d $*
-	grep \.properties $< | xargs -r cp --parents -t $*
-	touch $@
-
-%.jar: %-stamp
-	$(JAR) -C $* -cf $@ .
diff --git a/debian/changelog b/debian/changelog
index 3416c24..968da8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ swt4-gtk (4.6.1-1) UNRELEASED; urgency=medium
   * Team upload.
   * New upstream release
     - Refreshed the patches
+    - Adapted the build to the upstream source layout
   * Switch to debhelper level 10
   * Modified debian/watch to use the git mode
   * Standards-Version updated to 4.1.1
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..1ee3b0e
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,5 @@
+*.so
+bundles/org.eclipse.swt/@dot/
+bundles/org.eclipse.swt/swt.jar
+bundles/org.eclipse.swt/temp.folder/
+swt-gtk-*.jar
diff --git a/debian/control b/debian/control
index 38cae57..067914e 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Uploaders:
  أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at sabily.org>,
  Jakub Adam <jakub.adam at ktknet.cz>
 Build-Depends:
- cdbs,
+ ant,
  debhelper (>= 10),
  default-jdk,
  fastjar,
diff --git a/debian/copyright b/debian/copyright
index a2a8d82..c0ab4a5 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -13,57 +13,56 @@ Copyright: 2009-2010 Adrian Perez <adrianperez.deb at gmail.com>
            2011-2012 أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at sabily.org>
 License: GPL-3+
 
-Files: gnome*.c
-       gnome*.h
-       os*.c
-       os*.h
-       atk*.c
-       atk*.h
+Files: bundles/org.eclipse.swt/Eclipse?SWT?Program/gnome/library/gnome*.c
+       bundles/org.eclipse.swt/Eclipse?SWT?Program/gnome/library/gnome*.h
+       bundles/org.eclipse.swt/Eclipse?SWT?PI/gtk/library/os*.c
+       bundles/org.eclipse.swt/Eclipse?SWT?PI/gtk/library/os*.h
+       bundles/org.eclipse.swt/Eclipse?SWT?PI/gtk/library/atk*.c
+       bundles/org.eclipse.swt/Eclipse?SWT?PI/gtk/library/atk*.h
 Copyright: 2000-2010 IBM Corporation and others
 License: LGPL-2.1
 
-Files: cairo*.c
-       cairo*.h
-       org/eclipse/swt/internal/cairo/*
+Files: bundles/org.eclipse.swt/Eclipse?SWT?PI/cairo/library/cairo*.c
+       bundles/org.eclipse.swt/Eclipse?SWT?PI/cairo/library/cairo*.h
+       bundles/org.eclipse.swt/Eclipse?SWT?PI/cairo/org/eclipse/swt/internal/cairo/*
 Copyright: 2000-2009 IBM Corporation
 License: MPL-1.1
 
-Files: nsIScript*
+Files: bundles/org.eclipse.swt/Eclipse?SWT?Mozilla/common/library/nsIScript*
 Copyright: 2009 IBM Corporation and others
            1998-1999 Netscape Communications Corporation
 License: MPL-1.1 or GPL-2+ or LGPL-2.1
 
-Files: org/eclipse/swt/internal/mozilla/*.java
+Files: bundles/org.eclipse.swt/Eclipse?SWT?Mozilla/common/org/eclipse/swt/internal/mozilla/*.java
 Copyright: 2003-2011 IBM Corporation
            1998-1999 Netscape Communications Corporation
 License: MPL-1.1
 
-Files: org/eclipse/swt/internal/accessibility/gtk/*
+Files: bundles/org.eclipse.swt/Eclipse?SWT?PI/gtk/org/eclipse/swt/internal/accessibility/gtk/*
 Copyright: 2000-2010 IBM Corporation
 License: LGPL-2.1
 
-Files: org/eclipse/swt/internal/gtk/*.java
+Files: bundles/org.eclipse.swt/Eclipse?SWT?PI/gtk/org/eclipse/swt/internal/gtk/*.java
 Copyright: 2000-2011 IBM Corporation and others
 License: LGPL-2.1
 
-Files: org/eclipse/swt/internal/gtk/X*.java
+Files: bundles/org.eclipse.swt/Eclipse?SWT?PI/gtk/org/eclipse/swt/internal/gtk/X*.java
 Copyright: 2000-2012 IBM Corporation and others
 License: EPL-1.0
 
-Files: org/eclipse/swt/internal/gnome/*
+Files: bundles/org.eclipse.swt/Eclipse?SWT?Program/gnome/org/eclipse/swt/internal/gnome/*
 Copyright: 2000-2010 IBM Corporation and others
 License: LGPL-2.1
 
-Files: org/eclipse/swt/internal/cde/*
+Files: bundles/org.eclipse.swt/Eclipse?SWT?Program/cde/org/eclipse/swt/internal/cde/*
 Copyright: 2000-2008 IBM Corporation and others
 License: LGPL-2.1
 
-Files: org/eclipse/swt/internal/image/JPEGFileFormat.java
+Files: bundles/org.eclipse.swt/Eclipse?SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java
 Copyright: 2000-2008 IBM Corporation and others
 License: other
 
-Files: webkitgtk*
-       org/eclipse/swt/internal/webkit/*
+Files: bundles/org.eclipse.swt/Eclipse?SWT?WebKit/gtk/org/eclipse/swt/internal/webkit/*
 Copyright: 2009-2012 IBM Corporation and others
 License: LGPL-2.1
 
diff --git a/debian/libswt-gtk-4-java.links b/debian/libswt-gtk-4-java.links
index e8dcf20..aca2162 100644
--- a/debian/libswt-gtk-4-java.links
+++ b/debian/libswt-gtk-4-java.links
@@ -1,2 +1,3 @@
-usr/lib/java/swt-gtk-4.6.0.jar usr/share/java/swt-gtk-4.6.jar
-usr/share/java/swt-gtk-4.6.jar usr/share/java/swt4.jar
+usr/share/java/org.eclipse.swt.jar usr/share/java/swt4.jar
+usr/share/java/swt4.jar usr/lib/java/swt-gtk-4.6.0.jar
+usr/share/java/swt4.jar usr/share/java/swt-gtk-4.6.jar
diff --git a/debian/libswt-gtk-4-java.poms b/debian/libswt-gtk-4-java.poms
index 1a7e280..3231269 100644
--- a/debian/libswt-gtk-4-java.poms
+++ b/debian/libswt-gtk-4-java.poms
@@ -1 +1 @@
-debian/pom.xml
+debian/pom.xml --java-lib --has-package-version --artifact=bundles/org.eclipse.swt/swt.jar
diff --git a/debian/rules b/debian/rules
index 70a791e..6e8ec56 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,47 +5,52 @@ include /usr/share/dpkg/buildflags.mk
 CFLAGS+=$(CPPFLAGS)
 export DEB_LDFLAGS  := $(LDFLAGS)
 
-include /usr/share/cdbs/1/class/makefile.mk
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/javahelper.mk
-
 include /usr/share/javahelper/java-vars.mk
 
-BITS = $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
-
 DEB_DH_MAKESHLIBS_ARGS_ALL := -Xjni
 
 AWT_LIB_DIR := $(JAVA_ARCH)
 
 export AWT_LIB_PATH=/usr/lib/jvm/default-java/jre/lib/$(AWT_LIB_DIR)
 
-export GTK_VERSION=3.0
-
-makecleanbuildir::patch
-
-DEB_MAKE_MAKEFILE = debian/Makefile
-
-post-patches:: patch_64_bit
+MAKE_ARGS=-C bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library -I../../../Eclipse\ SWT/common/library/ -f make_linux.mak
 
-install/libswt-gtk-4-java::
-	mh_installpoms -plibswt-gtk-4-java
-	mh_linkjar -plibswt-gtk-4-java -l debian/pom.xml usr/share/java/swt4.jar
-
-clean:: unpatch_64_bit
-
-patch_64_bit:
-ifeq ($(BITS), 64)
-	# Replaces occurrences in *.java files
-	# of 'int /*long*/' with 'long /*int*/' for 64 bits
-	find . -name '*.java' | xargs sed -i 's at int /\*long\*/@long /\*int\*/@g'
-
-	# Add PTR_CFLAGS flags for 64 bits
-	sed -i 's at SWT_VERSION=$$(maj_ver)$$(min_ver)@SWT_VERSION=$$(maj_ver)$$(min_ver)\nSWT_PTR_CFLAGS=-DJNI64 at g' make_linux.mak
+ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH_BITS), 64)
+  IS64=true
+  export SWT_PTR_CFLAGS=-DJNI64
+else
+  IS64=false
 endif
 
-unpatch_64_bit:
-ifeq ($(BITS), 64)
-	# Reverse patch_64_bit target
-	find . -name '*.java' | xargs sed -i 's at long /\*int\*/@int /\*long\*/@g'
-	sed -i '/SWT_PTR_CFLAGS=-DJNI64/d' make_linux.mak
-endif
+
+%:
+	dh $@ --buildsystem=makefile --with maven-repo-helper --with javahelper
+
+override_dh_auto_build:
+	cd bundles/org.eclipse.swt && ant -f buildFragment.xml build.jars -Dswt.ws=gtk -Dplugindir=. -Dis64=$(IS64)
+	cp bundles/org.eclipse.swt/swt.jar swt-gtk-4.6.0.jar
+
+	cp bundles/org.eclipse.swt/Eclipse\ SWT/common/library/*         bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/
+	cp bundles/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/*.c     bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/
+	cp bundles/org.eclipse.swt/Eclipse\ SWT\ PI/cairo/library/*      bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/
+	cp bundles/org.eclipse.swt/Eclipse\ SWT\ OpenGL/glx/library/*    bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/
+	cp bundles/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/
+	cp bundles/org.eclipse.swt/Eclipse\ SWT\ PI/common/library/*     bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/
+	cp bundles/org.eclipse.swt/Eclipse\ SWT\ WebKit/gtk/library/*    bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/
+
+	GTK_VERSION=3.0 dh_auto_build -- $(MAKE_ARGS) make_atk make_awt make_cairo make_glx make_gnome make_swt make_webkit
+	rm -f bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/*.o
+	GTK_VERSION=2.0 dh_auto_build -- $(MAKE_ARGS) make_swtpi
+
+	cp bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/*.so .
+
+override_dh_auto_clean:
+	dh_auto_clean -- $(MAKE_ARGS) make_linux.mak clean
+	rm -f bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/callback*
+	rm -f bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/make_common.mak
+	rm -f bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/swt*
+	rm -f bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/cairo*
+	rm -f bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/glx*
+	rm -f bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/gnome*
+	rm -f bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/c*
+	rm -f bundles/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library/webkit*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/swt-gtk.git



More information about the pkg-java-commits mailing list