sqlite3 and other already-installed components
Mikhail T.
mi+thun at aldan.algebra.com
Wed May 25 21:03:58 UTC 2011
Hello!
As always, I'd like to see more of the already installed components used by the
Mozilla applications in preference of building their own versions...
The patch below adds sqlite3 to the _ALL_DEPENDS list in bsd.gecko.mk and
changes mail/thunderbird to build using that (other applications will need
similar modifications to remove the patching of bundled sqlite3).
For the time being we may still have to use the bundled version of png, because
graphics/png still builds without APNG-patch by default. But, hopefully, that
too will change soon.
One flaw of my changes is that due to a problem with Mozilla sources, if
SpiderMonkey port is already installed, the builds will fail:
https://bugzilla.mozilla.org/show_bug.cgi?id=553971
I put a check for that condition into the Makefile -- but, if there is interest,
I can look into fixing the problem in Mozilla's build scripts instead.
Lastly, I'd like to propose, that the desktop/thunderbird-lightning be merged
into mail/thunderbird -- as an option or even unconditionally. Lightning is
meaningless without the thunderbird, but building the extension currently
involves rebuilding the entire tree -- including the js* files and the dreadful
nsHtml5* sources...
Yours,
-mi
-------------- next part --------------
Index: Mk/bsd.gecko.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.gecko.mk,v
retrieving revision 1.27
diff -U 2 -r1.27 bsd.gecko.mk
--- Mk/bsd.gecko.mk 22 Mar 2011 15:26:35 -0000 1.27
+++ Mk/bsd.gecko.mk 25 May 2011 20:17:24 -0000
@@ -566,7 +566,11 @@
# Standard depends
-_ALL_DEPENDS= cairo dbm jpeg nspr nss png xft zip
+_ALL_DEPENDS= cairo dbm jpeg nspr nss png xft zip sqlite3
-cairo_LIB_DEPENDS= cairo.2:${PORTSDIR}/graphics/cairo
+sqlite3_LIB_DEPENDS= sqlite3:${PORTSDIR}/databases/sqlite3
+sqlite3_MOZ_OPTIONS= --enable-system-sqlite
+sqlite3_EXTRACT_AFTER_ARGS= --exclude mozilla/db/sqlite3
+
+cairo_LIB_DEPENDS= cairo:${PORTSDIR}/graphics/cairo
cairo_MOZ_OPTIONS= --enable-system-cairo
cairo_EXTRACT_AFTER_ARGS= --exclude mozilla/gfx/cairo
@@ -574,5 +578,5 @@
dbm_EXTRACT_AFTER_ARGS= --exclude mozilla/dbm
-jpeg_LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg
+jpeg_LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg
jpeg_MOZ_OPTIONS= --with-system-jpeg=${LOCALBASE}
jpeg_EXTRACT_AFTER_ARGS= --exclude mozilla/jpeg
@@ -587,9 +591,8 @@
nss_LDFLAGS+= -L${LOCALBASE}/lib/nss -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}
-
-png_LIB_DEPENDS= png.6:${PORTSDIR}/graphics/png
+png_LIB_DEPENDS= png:${PORTSDIR}/graphics/png
png_MOZ_OPTIONS= --with-system-png=${LOCALBASE}
-xft_LIB_DEPENDS= Xft.2:${PORTSDIR}/x11-fonts/libXft
+xft_LIB_DEPENDS= Xft:${PORTSDIR}/x11-fonts/libXft
zip_DEPENDS= zip:${PORTSDIR}/archivers/zip
Index: mail/thunderbird/Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/thunderbird/Makefile,v
retrieving revision 1.125
diff -U 2 -r1.125 Makefile
--- mail/thunderbird/Makefile 29 Apr 2011 06:37:41 -0000 1.125
+++ mail/thunderbird/Makefile 25 May 2011 20:17:24 -0000
@@ -17,9 +17,11 @@
BUILD_DEPENDS= nspr>=4.8:${PORTSDIR}/devel/nspr
+BUILD_DEPENDS= sqlite3>=3.7.4:${PORTSDIR}/databases/sqlite3
+LIB_DEPENDS= ical:${PORTSDIR}/devel/libical
USE_AUTOTOOLS= autoconf213
USE_GECKO= gecko
CONFLICTS_INSTALL= thunderbird-3.0*
-USE_MOZILLA= -png -nss -dbm -jpeg -xft
+USE_MOZILLA= yes
MOZ_TOOLKIT= cairo-gtk2
@@ -54,4 +56,8 @@
.include <bsd.port.pre.mk>
+.if exists(${LOCALBASE}/include/jsapi.h)
+.error The installed SpiderMonkey headers interfere with the build
+.endif
+
WRKSRC= ${WRKDIR}/comm-1.9.2
MOZSRC:= ${WRKSRC}/mozilla
@@ -95,8 +101,6 @@
post-patch:
${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS:C/-pthread/${GECKO_PTHREAD_LIBS}/}|' \
- ${MOZSRC}/storage/build/Makefile.in \
- ${MOZSRC}/db/sqlite3/src/Makefile.in
+ ${MOZSRC}/storage/build/Makefile.in
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
- ${MOZSRC}/security/manager/ssl/src/Makefile.in \
${MOZSRC}/js/src/config/mkdepend/Makefile.in \
${MOZSRC}/js/src/config/config.mk
Index: mail/thunderbird/files/patch-directory-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in
===================================================================
RCS file: mail/thunderbird/files/patch-directory-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in
diff -N mail/thunderbird/files/patch-directory-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ mail/thunderbird/files/patch-directory-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in 25 May 2011 20:17:24 -0000
@@ -0,0 +1,12 @@
+--- directory/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in 2011-04-14 14:37:48.000000000 -0400
++++ directory/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in 2011-05-25 13:32:01.000000000 -0400
+@@ -153,4 +154,9 @@
+ endif
+
++ifeq ($(OS_ARCH), FreeBSD))
++EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) $(NSSLINK) -lpthread
++CUSTOM_LIBS=1
++endif
++
+ ifeq ($(OS_ARCH), IRIX)
+ EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME)
Index: mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in
===================================================================
RCS file: mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in
diff -N mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in
--- mail/thunderbird/files/patch-mozilla-db-sqlite3-src-Makefile.in 3 Aug 2010 20:55:28 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- mozilla/db/sqlite3/src/Makefile.in.orig 2008-06-19 11:03:17.000000000 -0500
-+++ mozilla/db/sqlite3/src/Makefile.in 2008-06-19 11:04:15.000000000 -0500
-@@ -45,6 +45,8 @@
-
- include $(DEPTH)/config/autoconf.mk
-
-+OS_CFLAGS = -I../../../dist/include/sqlite3
-+OS_LIBS = %%PTHREAD_LIBS%%
- MODULE = sqlite3
- LIBRARY_NAME = sqlite3
- FORCE_SHARED_LIB = 1
Index: mail/thunderbird/files/patch-mozilla-modules-libpr0n-encoders-png-nsPNGEncoder.cpp
===================================================================
RCS file: mail/thunderbird/files/patch-mozilla-modules-libpr0n-encoders-png-nsPNGEncoder.cpp
diff -N mail/thunderbird/files/patch-mozilla-modules-libpr0n-encoders-png-nsPNGEncoder.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ mail/thunderbird/files/patch-mozilla-modules-libpr0n-encoders-png-nsPNGEncoder.cpp 25 May 2011 20:17:24 -0000
@@ -0,0 +1,9 @@
+--- mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.cpp 2011-04-14 14:37:31.000000000 -0400
++++ mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.cpp 2011-05-25 12:48:45.000000000 -0400
+@@ -136,5 +136,5 @@
+ // initialize
+ mPNG = png_create_write_struct(PNG_LIBPNG_VER_STRING,
+- png_voidp_NULL,
++ NULL,
+ ErrorCallback,
+ ErrorCallback);
Index: mail/thunderbird/files/patch-mozilla-security_nss_lib_freebl_mpi_mpcpucache.c
===================================================================
RCS file: mail/thunderbird/files/patch-mozilla-security_nss_lib_freebl_mpi_mpcpucache.c
diff -N mail/thunderbird/files/patch-mozilla-security_nss_lib_freebl_mpi_mpcpucache.c
--- mail/thunderbird/files/patch-mozilla-security_nss_lib_freebl_mpi_mpcpucache.c 1 Mar 2011 22:27:20 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,43 +0,0 @@
---- mozilla/security/nss/lib/freebl/mpi/mpcpucache.c.orig 2011-02-26 23:13:08.000000000 +0100
-+++ mozilla/security/nss/lib/freebl/mpi/mpcpucache.c 2011-02-26 23:18:46.000000000 +0100
-@@ -733,6 +733,32 @@
- #endif
-
- #if defined(__ppc64__)
-+#if defined(__FreeBSD__)
-+#include <sys/stddef.h>
-+#include <sys/sysctl.h>
-+
-+#include <machine/cpu.h>
-+#include <machine/md_var.h>
-+
-+unsigned long
-+s_mpi_getProcessorLineSize()
-+{
-+ static int cacheline_size = 0;
-+ static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE };
-+ int clen;
-+
-+ if (cacheline_size > 0)
-+ return cacheline_size;
-+
-+ clen = sizeof(cacheline_size);
-+ if (sysctl(cachemib, sizeof(cachemib) / sizeof(cachemib[0]),
-+ &cacheline_size, &clen, NULL, 0) < 0 || !cacheline_size)
-+ return 128; /* guess */
-+
-+ return cacheline_size;
-+}
-+#else /* __FreeBSD__ */
-+
- /*
- * Sigh, The PPC has some really nice features to help us determine cache
- * size, since it had lots of direct control functions to do so. The POWER
-@@ -786,6 +812,7 @@
- return 0;
- }
-
-+#endif /* __FreeBSD__ */
- #define MPI_GET_PROCESSOR_LINE_SIZE_DEFINED 1
- #endif
-
More information about the freebsd-gecko
mailing list