diff options
author | jkim <jkim@FreeBSD.org> | 2011-07-13 03:21:03 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2011-07-13 03:21:03 +0800 |
commit | 5f09fa95f87d87619e3f7b3d633fe9592144c3ab (patch) | |
tree | 6d9e8b4122de7b31b6399fd7e9da5ffa60841989 /java | |
parent | 39ad34ceb904d1c75d66829ba86425e29e017c5e (diff) | |
download | freebsd-ports-gnome-5f09fa95f87d87619e3f7b3d633fe9592144c3ab.tar.gz freebsd-ports-gnome-5f09fa95f87d87619e3f7b3d633fe9592144c3ab.tar.zst freebsd-ports-gnome-5f09fa95f87d87619e3f7b3d633fe9592144c3ab.zip |
Fix various build and installation issues.
- Replace various Linuxisms in Makefile with little more portable code.
Remove now unnecessary build dependency of sysutils/coreutils.
- Install launcher wrappers with INSTALL_SCRIPT[1].
- Rename javaws launcher to itweb-javaws throughout. This conflicts with
a symlink created by java/javavmwrapper[2].
PR: ports/158826 [1]
Reported by: glewis [2]
Diffstat (limited to 'java')
-rw-r--r-- | java/icedtea-web/Makefile | 21 | ||||
-rw-r--r-- | java/icedtea-web/files/patch-Makefile.in | 145 | ||||
-rw-r--r-- | java/icedtea-web/files/patch-launcher-javaws.in | 11 |
3 files changed, 160 insertions, 17 deletions
diff --git a/java/icedtea-web/Makefile b/java/icedtea-web/Makefile index 3de447567383..b7851b8f786c 100644 --- a/java/icedtea-web/Makefile +++ b/java/icedtea-web/Makefile @@ -24,20 +24,18 @@ OPTIONS= PLUGIN "Enable the browser plug-in" on \ RHINO "Add support for Proxy Auto Config files" off \ TEST "Add support for running regression test" off -MAN1= javaws.1 -PLIST_FILES= bin/itweb-settings bin/javaws \ +MAN1= itweb-javaws.1 +PLIST_FILES= bin/itweb-javaws bin/itweb-settings \ + share/applications/itweb-javaws.desktop \ share/applications/itweb-settings.desktop \ - share/applications/javaws.desktop \ - share/pixmaps/javaws.png + share/pixmaps/itweb-javaws.png PORTDATA= about.jar about.jnlp netx.jar PORTDOCS= netx BUILD_DEPENDS+= ${LOCALBASE}/bin/zip:${PORTSDIR}/archivers/zip \ - ${LOCALBASE}/bin/pkg-config:${PORTSDIR}/devel/pkg-config \ - ${LOCALBASE}/bin/ginstall:${PORTSDIR}/sysutils/coreutils + ${LOCALBASE}/bin/pkg-config:${PORTSDIR}/devel/pkg-config CONFIGURE_ARGS+=--with-ecj=no --with-jdk-home="${JAVA_HOME}" -CONFIGURE_ENV+= INSTALL_DATA="${LOCALBASE}/bin/ginstall" .include <bsd.port.pre.mk> @@ -87,10 +85,13 @@ pre-extract: post-install: ${MKDIR} ${DESKTOPDIR} - ${INSTALL_DATA} ${WRKSRC}/itweb-settings.desktop \ - ${WRKSRC}/javaws.desktop ${DESKTOPDIR} + ${REINPLACE_CMD} -e 's|^Icon=javaws|Icon=itweb-javaws|' \ + ${WRKSRC}/itweb-javaws.desktop ${WRKSRC}/itweb-settings.desktop + ${INSTALL_DATA} ${WRKSRC}/itweb-javaws.desktop \ + ${WRKSRC}/itweb-settings.desktop ${DESKTOPDIR} ${MKDIR} ${PREFIX}/share/pixmaps - ${INSTALL_DATA} ${WRKSRC}/javaws.png ${PREFIX}/share/pixmaps + ${INSTALL_DATA} ${WRKSRC}/javaws.png \ + ${PREFIX}/share/pixmaps/itweb-javaws.png .if defined(WITH_TEST) @${ECHO_MSG} @${ECHO_MSG} "Run \"make test\" to execute regression test." diff --git a/java/icedtea-web/files/patch-Makefile.in b/java/icedtea-web/files/patch-Makefile.in index fb33798514d8..7443146db435 100644 --- a/java/icedtea-web/files/patch-Makefile.in +++ b/java/icedtea-web/files/patch-Makefile.in @@ -1,6 +1,77 @@ --- Makefile.in.orig 2011-06-08 17:59:15.371244000 -0400 -+++ Makefile.in 2011-07-11 16:37:49.000000000 -0400 -@@ -758,7 +758,7 @@ ++++ Makefile.in 2011-07-12 13:22:56.000000000 -0400 +@@ -275,14 +275,14 @@ + + + # binary names +-javaws := $(shell echo javaws | sed '@program_transform_name@') ++itweb_javaws := $(shell echo itweb-javaws | sed '@program_transform_name@') + itweb_settings := $(shell echo itweb-settings | sed '@program_transform_name@') + + # the launcher needs to know $(bindir) and $(datadir) which can be different at + # make-time from configure-time + edit_launcher_script = sed \ + -e 's|[@]LAUNCHER_BOOTCLASSPATH[@]|$(LAUNCHER_BOOTCLASSPATH)|g' \ +- -e 's|[@]JAVAWS_BIN_LOCATION[@]|$(bindir)/$(javaws)|g' \ ++ -e 's|[@]JAVAWS_BIN_LOCATION[@]|$(bindir)/$(itweb_javaws)|g' \ + -e 's|[@]ITWEB_SETTINGS_BIN_LOCATION[@]|$(bindir)/$(itweb_settings)|g' \ + -e 's|[@]JAVA[@]|$(JAVA)|g' \ + -e 's|[@]JRE[@]|$(JRE)|g' +@@ -621,8 +621,8 @@ + # Top-Level Targets + # ================= + +-all-local: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(javaws) \ +- javaws.desktop stamps/docs.stamp launcher.build/$(itweb_settings) itweb-settings.desktop ++all-local: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher.build/$(itweb_javaws) \ ++ itweb-javaws.desktop stamps/docs.stamp launcher.build/$(itweb_settings) itweb-settings.desktop + + check-local: $(RHINO_TESTS) $(JUNIT_TESTS) + +@@ -642,24 +642,26 @@ + @ENABLE_PLUGIN_TRUE@ ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(libdir) + @ENABLE_PLUGIN_TRUE@ ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar + ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar +- ${INSTALL_PROGRAM} launcher.build/$(javaws) $(DESTDIR)$(bindir) ++ ${INSTALL_SCRIPT} launcher.build/$(itweb_javaws) $(DESTDIR)$(bindir) + ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar +- ${INSTALL_PROGRAM} launcher.build/$(itweb_settings) $(DESTDIR)$(bindir) ++ ${INSTALL_SCRIPT} launcher.build/$(itweb_settings) $(DESTDIR)$(bindir) + + install-data-local: + ${mkinstalldirs} -d $(DESTDIR)$(mandir)/man1 +- ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(mandir)/man1 ++ ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(mandir)/man1/itweb-javaws.1 + ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME) + @ENABLE_DOCS_TRUE@ ${mkinstalldirs} $(DESTDIR)$(htmldir) + @ENABLE_DOCS_TRUE@ (cd ${abs_top_builddir}/docs/netx; \ + @ENABLE_DOCS_TRUE@ for files in $$(find . -type f); \ + @ENABLE_DOCS_TRUE@ do \ +-@ENABLE_DOCS_TRUE@ ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/netx/$${files}; \ ++@ENABLE_DOCS_TRUE@ mkdir -p `dirname $(DESTDIR)$(htmldir)/netx/$${files}`; \ ++@ENABLE_DOCS_TRUE@ ${INSTALL_DATA} $${files} $(DESTDIR)$(htmldir)/netx/$${files}; \ + @ENABLE_DOCS_TRUE@ done) + @ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ (cd ${abs_top_builddir}/docs/plugin; \ + @ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ for files in $$(find . -type f); \ + @ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ do \ +-@ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/plugin/$${files}; \ ++@ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ mkdir -p `dirname $(DESTDIR)$(htmldir)/plugin/$${files}`; \ ++@ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ ${INSTALL_DATA} $${files} $(DESTDIR)$(htmldir)/plugin/$${files}; \ + @ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ done) + + uninstall-local: +@@ -668,8 +670,8 @@ + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jnlp + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar +- rm -f $(DESTDIR)$(mandir)/man1/javaws.1 +- rm -f $(DESTDIR)$(bindir)/$(javaws) ++ rm -f $(DESTDIR)$(mandir)/man1/itweb-javaws.1 ++ rm -f $(DESTDIR)$(bindir)/$(itweb_javaws) + rm -f $(DESTDIR)$(bindir)/$(itweb_settings) + rm -rf $(DESTDIR)$(htmldir) + +@@ -758,7 +760,7 @@ netx-source-files.txt: find $(NETX_SRCDIR) -name '*.java' | sort > $@ @@ -9,7 +80,67 @@ stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp mkdir -p $(NETX_DIR) -@@ -897,7 +897,7 @@ +@@ -770,7 +772,8 @@ + (cd $(NETX_RESOURCE_DIR); \ + for files in $$(find . -type f); \ + do \ +- ${INSTALL_DATA} -D $${files} \ ++ mkdir -p `dirname $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}`; \ ++ ${INSTALL_DATA} $${files} \ + $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \ + done) + cp -a $(NETX_SRCDIR)/net/sourceforge/jnlp/runtime/pac-funcs.js \ +@@ -798,10 +801,10 @@ + rm -f stamps/netx.stamp + + clean-desktop-files: +- rm -f javaws.desktop ++ rm -f itweb-javaws.desktop + rm -f itweb-settings.desktop + +-# extras -- used to create about.jar for javaws. ++# extras -- used to create about.jar for itweb-javaws. + extra-source-files.txt: + find $(abs_top_srcdir)/extra -name '*.java' | sort > $@ + +@@ -813,7 +816,8 @@ + (cd $(NETX_EXTRA_DIR); \ + for files in $$(find . -type f); \ + do \ +- ${INSTALL_DATA} -D $${files} \ ++ mkdir -p `dirname $(NETX_EXTRA_DIST_DIR)/$${files}`; \ ++ ${INSTALL_DATA} $${files} \ + $(NETX_EXTRA_DIST_DIR)/$${files}; \ + done) + mkdir -p stamps +@@ -827,7 +831,7 @@ + extra-lib/about.jar: stamps/extra-class-files.stamp + $(BOOT_DIR)/bin/jar cf $@ -C extra-lib net ; + +-launcher.build/$(javaws): launcher/javaws.in ++launcher.build/$(itweb_javaws): launcher/javaws.in + mkdir -p launcher.build + $(edit_launcher_script) < $< > $@ + +@@ -836,14 +840,14 @@ + $(edit_launcher_script) < $< > $@ + + clean-launchers: +- rm -f launcher.build/$(javaws) ++ rm -f launcher.build/$(itweb_javaws) + rm -f launcher.build/$(itweb_settings) + if [ -e launcher.build ] ; then \ + rmdir launcher.build ; \ + fi + +-javaws.desktop: javaws.desktop.in +- sed "s#PATH_TO_JAVAWS#$(bindir)/$(javaws)#" < $(srcdir)/javaws.desktop.in > javaws.desktop ++itweb-javaws.desktop: javaws.desktop.in ++ sed "s#PATH_TO_JAVAWS#$(bindir)/$(itweb_javaws)#" < $(srcdir)/javaws.desktop.in > itweb-javaws.desktop + + itweb-settings.desktop: $(srcdir)/itweb-settings.desktop.in + sed "s#PATH_TO_ITWEB_SETTINGS#$(bindir)/$(itweb_settings)#" \ +@@ -897,7 +901,7 @@ fi check-pac-functions: stamps/bootstrap-directory.stamp @@ -18,13 +149,13 @@ $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js) junit-runner-source-files.txt: -@@ -926,10 +926,11 @@ +@@ -926,10 +930,11 @@ run-netx-unit-tests: stamps/netx-unit-tests-compile.stamp \ $(JUNIT_RUNNER_JAR) - cp {$(NETX_UNIT_TEST_SRCDIR),$(NETX_UNIT_TEST_DIR)}/net/sourceforge/jnlp/basic.jnlp + cp $(NETX_UNIT_TEST_SRCDIR)/net/sourceforge/jnlp/basic.jnlp \ -+ $(NETX_UNIT_TEST_DIR)/net/sourceforge/jnlp ++ $(NETX_UNIT_TEST_DIR)/net/sourceforge/jnlp/basic.jnlp cd $(NETX_UNIT_TEST_DIR) ; \ class_names= ; \ - for test in `find -type f` ; do \ @@ -32,14 +163,14 @@ class_name=`echo $$test | sed -e 's|\.class$$||' -e 's|^\./||'` ; \ class_name=`echo $$class_name | sed -e 's|/|.|g' ` ; \ class_names="$$class_names $$class_name" ; \ -@@ -963,9 +964,7 @@ +@@ -963,9 +968,7 @@ @ENABLE_PLUGIN_TRUE@ $(PLUGIN_TEST_SRCS) ; @ENABLE_PLUGIN_TRUE@ $(BOOT_DIR)/bin/jar cf plugin/tests/LiveConnect/PluginTest.jar \ @ENABLE_PLUGIN_TRUE@ plugin/tests/LiveConnect/*.class ; -@ENABLE_PLUGIN_TRUE@ cp -pPR $(SRC_DIR_LINK) $(abs_top_srcdir)/plugin/tests/LiveConnect/*.{js,html} \ -@ENABLE_PLUGIN_TRUE@ plugin/tests/LiveConnect ; -@ENABLE_PLUGIN_TRUE@ echo "Done. Now launch \"firefox file://`pwd`/index.html\"" ; -+@ENABLE_PLUGIN_TRUE@ echo "Done. Now launch \"firefox file://$(abs_top_srcdir)/plugin/tests/LiveConnect/index.html\"" ; ++@ENABLE_PLUGIN_TRUE@ echo "Done. Now launch \"firefox file://`realpath plugin/tests/LiveConnect`/index.html\"" ; @ENABLE_PLUGIN_TRUE@ mkdir -p stamps @ENABLE_PLUGIN_TRUE@ touch stamps/plugin-tests.stamp diff --git a/java/icedtea-web/files/patch-launcher-javaws.in b/java/icedtea-web/files/patch-launcher-javaws.in new file mode 100644 index 000000000000..171d66c8c019 --- /dev/null +++ b/java/icedtea-web/files/patch-launcher-javaws.in @@ -0,0 +1,11 @@ +--- launcher/javaws.in.orig 2011-06-08 15:42:40.284750000 -0400 ++++ launcher/javaws.in 2011-07-12 14:12:11.000000000 -0400 +@@ -5,7 +5,7 @@ + LAUNCHER_FLAGS=-Xms8m + CLASSNAME=net.sourceforge.jnlp.runtime.Boot + BINARY_LOCATION=@JAVAWS_BIN_LOCATION@ +-PROGRAM_NAME=javaws ++PROGRAM_NAME=itweb-javaws + CP=@JRE@/lib/rt.jar + + JAVA_ARGS= |