Various changes to fix build on Darwin.

This commit is contained in:
jperkin 2015-09-05 13:03:22 +00:00
parent 542298a581
commit 89f289e83c
16 changed files with 97 additions and 56 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2015/06/18 16:33:26 gdt Exp $
# $NetBSD: Makefile,v 1.7 2015/09/05 13:03:22 jperkin Exp $
#
# The CUPS author is very good about taking back changes into the main
# CUPS distribution. The correct place to send patches or bug-fixes is:
@ -56,6 +56,7 @@ CONFIGURE_ARGS+= --enable-openssl
CONFIGURE_ARGS+= --enable-bannertops
CONFIGURE_ARGS+= --enable-texttops
CONFIGURE_ARGS+= --with-manext=bsd
CONFIGURE_ARGS+= --without-bundledir
CONFIGURE_ARGS+= --without-icondir
CONFIGURE_ARGS+= --without-menudir
CONFIGURE_ARGS+= --without-perl
@ -79,8 +80,10 @@ CONFIGURE_ENV+= ac_cv_func_epoll_create=no
.endif
LIBS+= ${BUILDLINK_LDADD.iconv}
PLIST_VARS+= notmac
.if ${OPSYS} != "Darwin"
PLIST_VARS+= mac notmac
.if ${OPSYS} == "Darwin"
PLIST.mac= yes
.else
PLIST.notmac= yes
.endif
@ -184,7 +187,7 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/cups.pam ${DESTDIR}${EGDIR}
.endif
.if !empty(PKG_OPTIONS:Mdnssd)
${LN} -s ${DESTDIR}${PREFIX}/libexec/cups/backend/dnssd ${DESTDIR}${PREFIX}/libexec/cups/backend/mdns
${LN} -fs ${DESTDIR}${PREFIX}/libexec/cups/backend/dnssd ${DESTDIR}${PREFIX}/libexec/cups/backend/mdns
.endif
.include "../../converters/libiconv/buildlink3.mk"

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.1 2014/06/17 13:17:12 wiz Exp $
@comment $NetBSD: PLIST,v 1.2 2015/09/05 13:03:22 jperkin Exp $
bin/cancel
bin/cups-config
bin/cupstestdsc
@ -42,6 +42,10 @@ lib/libcupsdriver.la
lib/libcupsimage.la
lib/libcupsmime.la
lib/libcupsppdc.la
${PLIST.mac}libexec/cups/apple/http
${PLIST.mac}libexec/cups/apple/https
${PLIST.mac}libexec/cups/apple/ipp
${PLIST.mac}libexec/cups/apple/ipps
${PLIST.dnssd}libexec/cups/backend/dnssd
libexec/cups/backend/http
libexec/cups/backend/https

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.2 2015/06/18 16:33:26 gdt Exp $
$NetBSD: distinfo,v 1.3 2015/09/05 13:03:22 jperkin Exp $
SHA1 (cups-1.5.4-source.tar.bz2) = cb39961cbaf1851a47694828ad9a7cdf4da51fbd
RMD160 (cups-1.5.4-source.tar.bz2) = 9d6a7fd69d3036ec1f3dfd9c70672a2c6fb517b6
@ -6,22 +6,23 @@ Size (cups-1.5.4-source.tar.bz2) = 9583002 bytes
SHA1 (str4609-1.5.patch) = 07b06a1f097303e511bfe7bdddc0a6e8737185e9
RMD160 (str4609-1.5.patch) = f83ccd525661d7a24294fb2f79233da455f37572
Size (str4609-1.5.patch) = 10825 bytes
SHA1 (patch-ac) = d99dfa6e71efdc5f069c2c3e73e1b29beebf5c9b
SHA1 (patch-ac) = 1175653cb826094e5acce322ed0fcfca13abc322
SHA1 (patch-ad) = a8d6610c4057ae98d98435ba577606e3c2bfb4b9
SHA1 (patch-ae) = 67e846ac428b4c44d8da9b49d959fa4f14fbb494
SHA1 (patch-af) = 025f198dd491a55ffc460d03d3ad23a100fe5271
SHA1 (patch-ag) = 680c1c7fb44d8153b5825252d2e297a5196ca98e
SHA1 (patch-ah) = 27d9b92a2f1ae116162b4f24d9aab3a955d52052
SHA1 (patch-ai) = 13725f3b4e0016acf5ead79cadb9626d1f2ce58e
SHA1 (patch-an) = 231c871e31db279e8aeafba71506f93330e0a971
SHA1 (patch-ao) = 7fe50080b9a6fd4dac186020f9351ef6000373c7
SHA1 (patch-at) = bbda891ed0820e23fe7f6fe3dd5326eeda5b3b2e
SHA1 (patch-au) = 0d1d3cf255b996c96b0ea798f46b08523ef22a60
SHA1 (patch-af) = c1554d4481b071236a8071a8498192d439e0b225
SHA1 (patch-ag) = def48ccd676e63f61472cb0b7f7a656a71152df3
SHA1 (patch-ah) = f60952e0f52c25e308fbea4c4dfcf2e9e26b3d0a
SHA1 (patch-ai) = 6f01606c59dce5b18e17c227d406b31c5c638b61
SHA1 (patch-an) = fa83935d328d10ba60d05884a44c7f29ace75cf3
SHA1 (patch-ao) = ace7c7a6e5a1c9d90aaa3d8a608978573fd5a9ce
SHA1 (patch-at) = 6c6167d0394c164bdf1f6ff17976d9a40f9a87af
SHA1 (patch-au) = c929e9fd49cfc54d5f69a1982632b455f67b08fd
SHA1 (patch-conf_Makefile) = 5b5d45abc1e8d6b73a1ad6b7a7098714d4c55395
SHA1 (patch-config-scripts_cups-gssapi.m4) = 6f558ee1d2d56ceba3a9705d3278c7969495be5d
SHA1 (patch-config-scripts_cups-common.m4) = 5b6a21afef0b16df67af901b8bbf1317eaaad53e
SHA1 (patch-config-scripts_cups-gssapi.m4) = c81240b2ce05133a1ce4981ef6286ac03bcabcf5
SHA1 (patch-config.h.in) = 0f072063d24810dcbdd2d095b9f2fa6bab44ff20
SHA1 (patch-filter_raster.c) = fc48e9cc7f7f32355816355dfc199157a00246c7
SHA1 (patch-ppdc_Makefile) = 7dcc34217557a4c6f42064b61abf593bd7620b60
SHA1 (patch-ppdc_Makefile) = 50ba637ab159c19225690d8cf1c28dc7811f7275
SHA1 (patch-scheduler_auth.c) = 29cd4378eb4ceeb1e618534fc5a9975022dbcf2c
SHA1 (patch-scheduler_client.c) = d4b6667199c0ff9617847ba119b82a50457cfd98
SHA1 (patch-scheduler_dirsvc.c) = 62c6b47522a60b9f8042421e4a9d25a5dfa47c47
SHA1 (patch-scheduler_dirsvc.c) = b544ec183f8ffb0c0f86541a6ed2c154192a1376

View file

@ -1,8 +1,8 @@
$NetBSD: patch-ac,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-ac,v 1.2 2015/09/05 13:03:22 jperkin Exp $
libtoolize.
--- configure.in.orig 2008-11-14 19:32:22.000000000 +0000
--- configure.in.orig 2011-08-31 01:36:33.000000000 +0000
+++ configure.in
@@ -22,7 +22,6 @@ sinclude(config-scripts/cups-manpages.m4

View file

@ -1,8 +1,8 @@
$NetBSD: patch-af,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-af,v 1.2 2015/09/05 13:03:22 jperkin Exp $
* Remove unneeded $(LIBTOOL), it's now in $(INSTALL_BIN).
--- backend/Makefile.orig 2011-05-04 04:28:00.000000000 +0000
--- backend/Makefile.orig 2012-04-23 17:42:12.000000000 +0000
+++ backend/Makefile
@@ -89,7 +89,7 @@ install-exec: $(INSTALLXPC)
echo Installing backends in $(SERVERBIN)/backend
@ -13,3 +13,12 @@ $NetBSD: patch-af,v 1.1 2014/06/17 13:17:13 wiz Exp $
done
for file in $(UBACKENDS); do \
$(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
@@ -112,7 +112,7 @@ install-exec: $(INSTALLXPC)
install-xpc: ipp
echo Installing XPC backends in $(SERVERBIN)/apple
$(INSTALL_DIR) -m 755 $(SERVERBIN)/apple
- $(LIBTOOL) $(INSTALL_BIN) ipp $(SERVERBIN)/apple
+ $(INSTALL_BIN) ipp $(SERVERBIN)/apple
for file in $(IPPALIASES); do \
$(RM) $(SERVERBIN)/apple/$$file; \
$(LN) ipp $(SERVERBIN)/apple/$$file; \

View file

@ -1,8 +1,8 @@
$NetBSD: patch-ag,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-ag,v 1.2 2015/09/05 13:03:22 jperkin Exp $
cups installs stuff in /usr/pkg/lib64 on Linux. Don't do this.
--- config-scripts/cups-3264.m4.orig 2009-04-19 21:18:45.000000000 +0000
--- config-scripts/cups-3264.m4.orig 2011-05-12 05:21:56.000000000 +0000
+++ config-scripts/cups-3264.m4
@@ -95,7 +95,7 @@ case "$uname" in
LIB32CUPS="32bit/libcups.so.2"

View file

@ -1,11 +1,11 @@
$NetBSD: patch-ah,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-ah,v 1.2 2015/09/05 13:03:22 jperkin Exp $
Some builds of gcc seem to support this for compiling but then fail during
linking with undefined reference to `__stack_chk_fail_local'
--- config-scripts/cups-compiler.m4.orig 2009-05-17 00:13:47.000000000 +0000
--- config-scripts/cups-compiler.m4.orig 2011-09-09 17:28:58.000000000 +0000
+++ config-scripts/cups-compiler.m4
@@ -140,8 +140,9 @@ if test -n "$GCC"; then
@@ -125,8 +125,9 @@ if test -n "$GCC"; then
AC_MSG_CHECKING(if GCC supports -fstack-protector)
OLDCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fstack-protector"

View file

@ -1,8 +1,8 @@
$NetBSD: patch-ai,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-ai,v 1.2 2015/09/05 13:03:22 jperkin Exp $
Don't create directories, do that with OWN_DIRS and OWN_DIRS_PERMS
--- notifier/Makefile.orig 2009-04-12 23:04:51.000000000 +0000
--- notifier/Makefile.orig 2011-05-12 05:21:56.000000000 +0000
+++ notifier/Makefile
@@ -62,6 +62,8 @@ install: all install-data install-header
#

View file

@ -1,4 +1,4 @@
$NetBSD: patch-an,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-an,v 1.2 2015/09/05 13:03:22 jperkin Exp $
The '$' while loops expand the variables as long as possible so that no
references to other variables occur. This is necessary because fontpath
@ -9,7 +9,7 @@ loop.
I'm also sure that this is not the Right Way to fix it, but at least it
works.
--- config-scripts/cups-directories.m4.orig 2009-04-12 23:04:51.000000000 +0000
--- config-scripts/cups-directories.m4.orig 2011-05-12 05:21:56.000000000 +0000
+++ config-scripts/cups-directories.m4
@@ -106,7 +106,7 @@ if test "$libdir" = "\${exec_prefix}/lib
libdir="$exec_prefix/lib32"
@ -20,7 +20,7 @@ works.
libdir="$exec_prefix/lib64"
fi
;;
@@ -297,7 +297,15 @@ AC_SUBST(CUPS_CACHEDIR)
@@ -308,7 +308,15 @@ AC_SUBST(CUPS_CACHEDIR)
# Data files
CUPS_DATADIR="$datadir/cups"
@ -37,7 +37,7 @@ works.
AC_SUBST(CUPS_DATADIR)
# Icon directory
@@ -306,7 +314,11 @@ AC_ARG_WITH(icondir, [ --with-icondir
@@ -317,7 +325,11 @@ AC_ARG_WITH(icondir, [ --with-icondir
if test "x$icondir" = x -a -d /usr/share/icons; then
ICONDIR="/usr/share/icons"
else
@ -50,7 +50,7 @@ works.
fi
AC_SUBST(ICONDIR)
@@ -317,7 +329,11 @@ AC_ARG_WITH(menudir, [ --with-menudir
@@ -328,7 +340,11 @@ AC_ARG_WITH(menudir, [ --with-menudir
if test "x$menudir" = x -a -d /usr/share/applications; then
MENUDIR="/usr/share/applications"
else
@ -63,7 +63,7 @@ works.
fi
AC_SUBST(MENUDIR)
@@ -332,7 +348,15 @@ else
@@ -343,7 +359,15 @@ else
CUPS_DOCROOT="$docdir"
fi
@ -80,7 +80,7 @@ works.
AC_SUBST(CUPS_DOCROOT)
# Fonts
@@ -344,8 +368,16 @@ else
@@ -355,8 +379,16 @@ else
CUPS_FONTPATH="$fontpath"
fi
@ -98,7 +98,7 @@ works.
# Locale data
if test "$localedir" = "\${datarootdir}/locale"; then
@@ -367,6 +399,14 @@ else
@@ -378,6 +410,14 @@ else
CUPS_LOCALEDIR="$localedir"
fi
@ -113,7 +113,7 @@ works.
AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
AC_SUBST(CUPS_LOCALEDIR)
@@ -375,7 +415,6 @@ AC_ARG_WITH(logdir, [ --with-logdir
@@ -386,7 +426,6 @@ AC_ARG_WITH(logdir, [ --with-logdir
if test x$logdir = x; then
CUPS_LOGDIR="$localstatedir/log/cups"
@ -121,7 +121,7 @@ works.
else
CUPS_LOGDIR="$logdir"
fi
@@ -384,10 +423,13 @@ AC_SUBST(CUPS_LOGDIR)
@@ -395,10 +434,13 @@ AC_SUBST(CUPS_LOGDIR)
# Longer-term spool data
CUPS_REQUESTS="$localstatedir/spool/cups"
@ -136,7 +136,7 @@ works.
case "$uname" in
*BSD* | Darwin*)
# *BSD and Darwin (MacOS X)
@@ -400,6 +442,10 @@ case "$uname" in
@@ -411,6 +453,10 @@ case "$uname" in
CUPS_SERVERBIN="$exec_prefix/lib/cups"
;;
esac
@ -147,7 +147,7 @@ works.
AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN")
AC_SUBST(CUPS_SERVERBIN)
@@ -407,7 +453,7 @@ AC_SUBST(INSTALL_SYSV)
@@ -418,7 +464,7 @@ AC_SUBST(INSTALL_SYSV)
# Configuration files
CUPS_SERVERROOT="$sysconfdir/cups"

View file

@ -1,8 +1,8 @@
$NetBSD: patch-ao,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-ao,v 1.2 2015/09/05 13:03:22 jperkin Exp $
Add '--with-manext' configure option.
--- config-scripts/cups-manpages.m4.orig 2009-01-12 19:17:09.000000000 +0000
--- config-scripts/cups-manpages.m4.orig 2011-05-12 05:21:56.000000000 +0000
+++ config-scripts/cups-manpages.m4
@@ -13,6 +13,8 @@ dnl which should have been included wi
dnl file is missing or damaged, see the license at "http://www.cups.org/".

View file

@ -1,10 +1,10 @@
$NetBSD: patch-at,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-at,v 1.2 2015/09/05 13:03:22 jperkin Exp $
Don't create directories, do that with OWN_DIRS and OWN_DIRS_PERMS
--- scheduler/Makefile.orig 2009-05-26 23:27:06.000000000 +0000
--- scheduler/Makefile.orig 2011-05-11 22:17:34.000000000 +0000
+++ scheduler/Makefile
@@ -135,6 +135,8 @@ install: all install-data install-header
@@ -140,6 +140,8 @@ install: all install-data install-header
#
install-data:

View file

@ -1,6 +1,6 @@
$NetBSD: patch-au,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-au,v 1.2 2015/09/05 13:03:22 jperkin Exp $
--- scheduler/printers.c.orig 2011-06-15 00:46:13.000000000 +0000
--- scheduler/printers.c.orig 2012-02-15 23:21:06.000000000 +0000
+++ scheduler/printers.c
@@ -80,6 +80,9 @@
# include <asl.h>

View file

@ -0,0 +1,15 @@
$NetBSD: patch-config-scripts_cups-common.m4,v 1.1 2015/09/05 13:03:22 jperkin Exp $
Get rid of bogus OSX test.
--- config-scripts/cups-common.m4.orig 2012-07-25 20:43:57.000000000 +0000
+++ config-scripts/cups-common.m4
@@ -385,7 +385,7 @@ case $uname in
if test $uversion -ge 100; then
AC_CHECK_HEADER(sandbox.h,AC_DEFINE(HAVE_SANDBOX_H))
fi
- if test $uversion -ge 110; then
+ if test $uversion -ge 999110; then
# Broken public headers in 10.7...
AC_MSG_CHECKING(for sandbox/private.h presence)
if test -f /usr/local/include/sandbox/private.h; then

View file

@ -1,4 +1,4 @@
$NetBSD: patch-config-scripts_cups-gssapi.m4,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-config-scripts_cups-gssapi.m4,v 1.2 2015/09/05 13:03:22 jperkin Exp $
builtin krb5-config in platforms such as solaris do not support
the gssapi option, and need an explicit -lgss
@ -34,3 +34,12 @@ the gssapi option, and need an explicit -lgss
;;
esac
AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
@@ -105,7 +104,7 @@ if test x$enable_gssapi != xno; then
fi
else
AC_MSG_RESULT(no)
- if test $uversion -ge 110; then
+ if test $uversion -ge 999110; then
# Broken public headers in 10.7...
AC_MSG_ERROR(Run 'sudo mkdir -p $gssdir/PrivateHeaders' and 'sudo touch $gssdir/PrivateHeaders/gssapi_spi.h' to build CUPS.)
fi

View file

@ -1,7 +1,7 @@
$NetBSD: patch-ppdc_Makefile,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-ppdc_Makefile,v 1.2 2015/09/05 13:03:22 jperkin Exp $
--- ppdc/Makefile.orig 2011-01-06 23:21:05.000000000 +0100
+++ ppdc/Makefile 2011-11-13 15:51:42.867152712 +0100
--- ppdc/Makefile.orig 2011-01-06 22:20:15.000000000 +0000
+++ ppdc/Makefile
@@ -378,7 +378,7 @@ libcupsppdc_s.a: $(LIBOBJS) ../cups/$(LI
libcupsppdc.la: $(LIBOBJS) ../cups/$(LIBCUPS)
echo Linking $@...

View file

@ -1,8 +1,8 @@
$NetBSD: patch-scheduler_dirsvc.c,v 1.1 2014/06/17 13:17:13 wiz Exp $
$NetBSD: patch-scheduler_dirsvc.c,v 1.2 2015/09/05 13:03:22 jperkin Exp $
--- scheduler/dirsvc.c.orig 2011-01-22 01:07:22.000000000 +0100
+++ scheduler/dirsvc.c 2011-09-20 19:08:50.512786064 +0200
@@ -1332,7 +1332,7 @@ ldap_connect(void)
--- scheduler/dirsvc.c.orig 2012-02-11 02:05:21.000000000 +0000
+++ scheduler/dirsvc.c
@@ -1339,7 +1339,7 @@ ldap_connect(void)
cupsdLogMessage(CUPSD_LOG_ERROR, "LDAP bind failed with error %d: %s",
rc, ldap_err2string(rc));