[antlr] 39/87: * Build a antlr-gcj package, replace cantlr with a shell script to use it.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Tue Oct 24 14:49:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository antlr.
commit 06ae7400f4b77b5636d37352e74f3908cfdb641d
Author: Matthias Klose <doko at debian.org>
Date: Mon Sep 29 21:15:24 2008 +0000
* Build a antlr-gcj package, replace cantlr with a shell script to use it.
---
debian/Makefile.debian | 2 ++
debian/cantlr.sh | 5 +++++
debian/changelog | 5 +++--
debian/control | 14 +++++++++++++-
debian/rules | 35 ++++++++++++++++++++++++-----------
5 files changed, 47 insertions(+), 14 deletions(-)
diff --git a/debian/Makefile.debian b/debian/Makefile.debian
index be6effb..d5b5bef 100644
--- a/debian/Makefile.debian
+++ b/debian/Makefile.debian
@@ -26,9 +26,11 @@ clean:
rm -f *.so cantlr `find . -name '*.o'`
install:
+ mkdir -p $(DESTDIR)/usr/share/java
install -m644 antlr.jar $(DESTDIR)/usr/share/java
# install -m644 antlrall.jar $(DESTDIR)/usr/share/java
# install -m644 antlr.debug.jar $(DESTDIR)/usr/share/java
+ mkdir -p $(DESTDIR)/usr/bin
cp bin/antlr $(DESTDIR)/usr/bin/runantlr
chmod 755 $(DESTDIR)/usr/bin/runantlr
diff --git a/debian/cantlr.sh b/debian/cantlr.sh
new file mode 100755
index 0000000..215aee3
--- /dev/null
+++ b/debian/cantlr.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo Running 'java antlr.Tool $*' with /usr/share/java/antlr.jar appended to the CLASSPATH variable
+export CLASSPATH
+CLASSPATH=$CLASSPATH:/usr/share/java/antlr.jar
+exec gij antlr.Tool "$@"
diff --git a/debian/changelog b/debian/changelog
index 71bc06e..10f37f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-antlr (2.7.7-7) UNRELEASED; urgency=low
+antlr (2.7.7-7) unstable; urgency=low
[Michael Koch]
* Updated watch file to match only Antlr v2.
@@ -6,8 +6,9 @@ antlr (2.7.7-7) UNRELEASED; urgency=low
[Matthias Klose]
* antlr: Depend on default-jre-headless.
* Don't directly build-depend on gcj.
+ * Build a antlr-gcj package, replace cantlr with a shell script to use it.
- -- Matthias Klose <doko at debian.org> Thu, 31 Jul 2008 10:08:46 +0000
+ -- Matthias Klose <doko at debian.org> Mon, 29 Sep 2008 22:33:26 +0200
antlr (2.7.7-6) unstable; urgency=low
diff --git a/debian/control b/debian/control
index d35f188..2660f6e 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Homepage: http://www.antlr2.org/
Package: antlr
Architecture: all
Depends: default-jre-headless | java1-runtime-headless | java2-runtime-headless, ${python:Depends}
+Recommends: antlr-gcj
Description: language tool for constructing recognizers, compilers etc
ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is
a language tool that provides a framework for constructing recognizers,
@@ -28,6 +29,17 @@ Description: language tool for constructing recognizers, compilers etc
files (e.g., HTML, SGML). ANTLR is designed to handle all of your
translation tasks.
+Package: antlr-gcj
+Section: devel
+Architecture: any
+Depends: antlr (>= ${source:Version}), ${shlibs:Depends}
+Description: language tool for constructing recognizers, compilers etc
+ Native support for gij for antlr. ANTLR stands for ANother
+ Tool for Language Recognition, (formerly PCCTS). It is a language tool
+ that provides a framework for constructing recognizers, compilers, and
+ translators from grammatical descriptions containing C++
+ or Java actions.
+
Package: libantlr-dev
Section: libdevel
Architecture: any
@@ -55,7 +67,7 @@ Description: language tool for constructing recognizers, compilers etc
Package: cantlr
Section: devel
Architecture: any
-Depends: ${shlibs:Depends}
+Depends: gij, antlr-gcj, ${shlibs:Depends}
Description: language tool for constructing recognizers, compilers etc
This is the native-compiled version of antlr. ANTLR stands for ANother
Tool for Language Recognition, (formerly PCCTS). It is a language tool
diff --git a/debian/rules b/debian/rules
index 71e8ffb..56fab0a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,12 @@
#export DH_VERBOSE=1
export MONO_SHARED_DIR = $(shell pwd)/debian
-with_gcj := yes
+include /usr/share/gcj/debian_defaults
+
+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+ifneq (,$(filter $(DEB_HOST_ARCH), $(gcj_native_archs)))
+ with_native := yes
+endif
configure: configure-stamp
configure-stamp:
@@ -27,11 +32,7 @@ build: configure build-stamp
build-stamp:
dh_testdir
uudecode -o debian/antlr.snk debian/antlr.snk.uue
-ifeq ($(with_gcj),yes)
- $(MAKE) -f debian/Makefile.debian make_with_gcj
-else
- $(MAKE) -f debian/Makefile.debian compile
-endif
+ $(MAKE) -f debian/Makefile.debian compile build_antlr
$(MAKE) -C lib/cpp CXXFLAGS="+ -fPIC -DPIC"
mv -f lib/cpp/src/libantlr.a debian/libantlr-pic.a
$(MAKE) -C lib/cpp clean
@@ -81,11 +82,7 @@ install: build
dh_link -a
$(MAKE) -C lib/cpp install prefix=`pwd`/debian/libantlr-dev/usr
install -m755 scripts/antlr-config debian/libantlr-dev/usr/bin
-ifeq ($(with_gcj),yes)
- install -m755 cantlr debian/cantlr/usr/bin
-else
install -m755 debian/cantlr.sh debian/cantlr/usr/bin
-endif
install -m644 CHANGES.txt debian/cantlr/usr/share/doc/cantlr/changelog
install -m644 CHANGES.txt debian/libantlr-dev/usr/share/doc/libantlr-dev/changelog
install -m644 debian/libantlr-pic.a debian/libantlr-dev/usr/lib/
@@ -141,7 +138,7 @@ binary-indep: build-indep install-indep
binary-arch: build install
- # ibantlr-dev and cantlr
+ # libantlr-dev and cantlr
dh_testdir
dh_testroot
dh_installdocs -plibantlr-dev -pcantlr
@@ -158,5 +155,21 @@ binary-arch: build install
dh_md5sums -plibantlr-dev -pcantlr
dh_builddeb -plibantlr-dev -pcantlr
+ifeq ($(with_native),yes)
+ if [ ! -f debian/antlr/usr/share/java/antlr.jar ]; then \
+ $(MAKE) -f debian/Makefile.debian install DESTDIR=`pwd`/debian/antlr; \
+ fi
+ dh_nativejava -pantlr-gcj
+ dh_strip -pantlr-gcj
+ dh_compress -pantlr-gcj
+ dh_fixperms -pantlr-gcj
+ dh_makeshlibs -pantlr-gcj
+ dh_installdeb -pantlr-gcj
+ dh_shlibdeps -pantlr-gcj
+ dh_gencontrol -pantlr-gcj
+ dh_md5sums -pantlr-gcj
+ dh_builddeb -pantlr-gcj
+endif
+
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/antlr.git
More information about the pkg-java-commits
mailing list