summaryrefslogtreecommitdiffstats
path: root/science/gchemutils
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2006-05-26 22:21:20 +0000
committerpav <pav@FreeBSD.org>2006-05-26 22:21:20 +0000
commit32062d25b2bef57d1ff9ca177cb6450c4f9ba0eb (patch)
tree0a6cd0a77427d6f25b390a058b0c1196df071160 /science/gchemutils
parent37e49f653fef9c7f0722802075983ef526b27aa2 (diff)
downloadFreeBSD-ports-32062d25b2bef57d1ff9ca177cb6450c4f9ba0eb.zip
FreeBSD-ports-32062d25b2bef57d1ff9ca177cb6450c4f9ba0eb.tar.gz
- Support Mozilla plugin
Diffstat (limited to 'science/gchemutils')
-rw-r--r--science/gchemutils/Makefile12
-rw-r--r--science/gchemutils/files/patch-configure_mozilla-config11
-rw-r--r--science/gchemutils/pkg-plist3
3 files changed, 26 insertions, 0 deletions
diff --git a/science/gchemutils/Makefile b/science/gchemutils/Makefile
index 50bfcf3..ba04ba9 100644
--- a/science/gchemutils/Makefile
+++ b/science/gchemutils/Makefile
@@ -26,8 +26,20 @@ GNU_CONFIGURE= yes
INSTALLS_SHLIB= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LIBS="-L${LOCALBASE}/lib"
+OPTIONS= MOZILLA "Build mozilla plugin" off
+
.include <bsd.port.pre.mk>
+.if defined(WITH_MOZILLA)
+USE_GECKO= mozilla
+.include "${PORTSDIR}/www/mozilla/bsd.gecko.mk"
+CONFIGURE_ARGS+=--enable-mozilla-plugin
+PLIST_SUB= MOZILLA=""
+.else
+CONFIGURE_ARGS+=--disable-mozilla-plugin
+PLIST_SUB= MOZILLA="@comment "
+.endif
+
.if ${OSVERSION} < 500000
BROKEN= does not link with openbabel
.endif
diff --git a/science/gchemutils/files/patch-configure_mozilla-config b/science/gchemutils/files/patch-configure_mozilla-config
new file mode 100644
index 0000000..9c03784
--- /dev/null
+++ b/science/gchemutils/files/patch-configure_mozilla-config
@@ -0,0 +1,11 @@
+--- configure.orig Fri May 26 22:09:05 2006
++++ configure Fri May 26 22:21:37 2006
+@@ -21444,7 +21444,7 @@
+
+ if test "x$MOZILLA_CONFIG" != "xno"; then
+ _mozilla_include_dir=`mozilla-config --cflags|sed 's/-I\(.*\) .*/\1/'`
+- MOZILLA_CFLAGS="-I$_mozilla_include_dir/plugin -I$_mozilla_include_dir/java -I$_mozilla_include_dir/nspr"
++ MOZILLA_CFLAGS="`mozilla-config --cflags` -I$_mozilla_include_dir/plugin -I$_mozilla_include_dir/java -I$_mozilla_include_dir/nspr"
+ mozlibdir=`mozilla-config --libs|sed 's/-L//'`
+ else
+
diff --git a/science/gchemutils/pkg-plist b/science/gchemutils/pkg-plist
index f3d4842..96953e2 100644
--- a/science/gchemutils/pkg-plist
+++ b/science/gchemutils/pkg-plist
@@ -26,7 +26,10 @@ include/gchemutils/gcu/xml-utils.h
lib/libgcu.la
lib/libgcu.so
lib/libgcu.so.6
+%%MOZILLA%%lib/mozilla/plugins/libmozgcu.la
+%%MOZILLA%%lib/mozilla/plugins/libmozgcu.so
libdata/pkgconfig/gcu.pc
+%%MOZILLA%%libexec/chem-viewer
share/gnome/applications/gchem3d-viewer.desktop
share/gnome/applications/gchemcalc.desktop
share/gnome/applications/gchemtable.desktop
OpenPOWER on IntegriCloud