pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Split out the code that deals with checking whether th...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e9c1a9754cd0
branches: trunk
changeset: 470587:e9c1a9754cd0
user: jlam <jlam%pkgsrc.org@localhost>
date: Wed Mar 10 17:57:14 2004 +0000
description:
Split out the code that deals with checking whether the software is
built-in or not into a separate builtin.mk file. The code to deal
checking for built-in software is much simpler to deal with in pkgsrc.
The buildlink3.mk file for a package will be of the usual format
regardless of the package, which makes it simpler for packagers to
update a package.
The builtin.mk file for a package must define a single yes/no variable
USE_BUILTIN.<pkg> that is used by bsd.buildlink3.mk to decide whether
to use the built-in software or to use the pkgsrc software.
diffstat:
archivers/bzip2/buildlink3.mk | 74 +------------
archivers/bzip2/builtin.mk | 41 +++++++
converters/libiconv/buildlink3.mk | 111 +--------------------
converters/libiconv/builtin.mk | 78 +++++++++++++++
devel/binutils/buildlink3.mk | 82 +--------------
devel/binutils/builtin.mk | 44 ++++++++
devel/gettext-lib/buildlink3.mk | 155 +----------------------------
devel/gettext-lib/builtin.mk | 146 ++++++++++++++++++++++++++++
devel/libgetopt/buildlink3.mk | 58 ++--------
devel/libgetopt/builtin.mk | 26 +++++
devel/ncurses/buildlink3.mk | 168 +-------------------------------
devel/ncurses/builtin.mk | 133 +++++++++++++++++++++++++
devel/readline/buildlink3.mk | 153 +---------------------------
devel/readline/builtin.mk | 116 ++++++++++++++++++++++
devel/zlib/buildlink3.mk | 110 +-------------------
devel/zlib/builtin.mk | 81 +++++++++++++++
fonts/Xft2/buildlink3.mk | 140 +-------------------------
fonts/Xft2/builtin.mk | 100 +++++++++++++++++++
fonts/fontconfig/buildlink3.mk | 120 ++---------------------
fonts/fontconfig/builtin.mk | 75 ++++++++++++++
graphics/MesaLib/buildlink3.mk | 126 +----------------------
graphics/MesaLib/builtin.mk | 87 ++++++++++++++++
graphics/freetype2/buildlink3.mk | 105 +------------------
graphics/freetype2/builtin.mk | 66 ++++++++++++
graphics/glu/buildlink3.mk | 98 +-----------------
graphics/glu/builtin.mk | 61 +++++++++++
graphics/xpm/buildlink3.mk | 96 ++----------------
graphics/xpm/builtin.mk | 72 +++++++++++++
net/libpcap/buildlink3.mk | 54 +--------
net/libpcap/builtin.mk | 15 ++
security/PAM/buildlink3.mk | 52 +--------
security/PAM/builtin.mk | 15 ++
security/heimdal/buildlink3.mk | 118 +---------------------
security/heimdal/builtin.mk | 80 +++++++++++++++
security/openssl/buildlink3.mk | 186 ++---------------------------------
security/openssl/builtin.mk | 135 ++++++++++++++++++++++++++
security/tcp_wrappers/buildlink3.mk | 39 +------
security/tcp_wrappers/builtin.mk | 15 ++
textproc/expat/buildlink3.mk | 101 +------------------
textproc/expat/builtin.mk | 69 +++++++++++++
x11/Xrandr-mixedcase/buildlink3.mk | 140 +-------------------------
x11/Xrandr-mixedcase/builtin.mk | 99 +++++++++++++++++++
x11/Xrender/buildlink3.mk | 147 ++-------------------------
x11/Xrender/builtin.mk | 100 +++++++++++++++++++
x11/randrext/buildlink3.mk | 91 +---------------
x11/randrext/builtin.mk | 58 +++++++++++
x11/render/buildlink3.mk | 89 +---------------
x11/render/builtin.mk | 58 +++++++++++
x11/xcursor/buildlink3.mk | 112 ++------------------
x11/xcursor/builtin.mk | 68 +++++++++++++
50 files changed, 2063 insertions(+), 2500 deletions(-)
diffs (truncated from 5070 to 300 lines):
diff -r 9cc902b79a68 -r e9c1a9754cd0 archivers/bzip2/buildlink3.mk
--- a/archivers/bzip2/buildlink3.mk Wed Mar 10 17:49:26 2004 +0000
+++ b/archivers/bzip2/buildlink3.mk Wed Mar 10 17:57:14 2004 +0000
@@ -1,78 +1,18 @@
-# $NetBSD: buildlink3.mk,v 1.14 2004/02/18 16:35:27 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.15 2004/03/10 17:57:14 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
BZIP2_BUILDLINK3_MK:= ${BZIP2_BUILDLINK3_MK}+
-.include "../../mk/bsd.prefs.mk"
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= bzip2
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nbzip2}
+BUILDLINK_PACKAGES+= bzip2
.if !empty(BZIP2_BUILDLINK3_MK:M+)
-BUILDLINK_PACKAGES+= bzip2
BUILDLINK_DEPENDS.bzip2+= bzip2>=1.0.1
BUILDLINK_PKGSRCDIR.bzip2?= ../../archivers/bzip2
.endif # BZIP2_BUILDLINK3_MK
-BUILDLINK_CHECK_BUILTIN.bzip2?= NO
-
-.if !defined(BUILDLINK_IS_BUILTIN.bzip2)
-BUILDLINK_IS_BUILTIN.bzip2= NO
-. if exists(/usr/include/bzlib.h)
-BUILDLINK_IS_BUILTIN.bzip2!= \
- if ${GREP} -q "BZ2_" /usr/include/bzlib.h; then \
- ${ECHO} "YES"; \
- else \
- ${ECHO} "NO"; \
- fi
-. endif
-. if !empty(BUILDLINK_CHECK_BUILTIN.bzip2:M[nN][oO])
-#
-# Solaris 9 has bzip2 1.0.1, build it on older versions.
-# Darwin only has static libbz2.a, which can't be buildlinked.
-#
-_INCOMPAT_BZIP2?= SunOS-5.[678]-* Darwin-*
-. for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
-BUILDLINK_IS_BUILTIN.bzip2= NO
-. endif
-. endfor
-. endif
-MAKEFLAGS+= BUILDLINK_IS_BUILTIN.bzip2=${BUILDLINK_IS_BUILTIN.bzip2}
-.endif
-
-.if !empty(BUILDLINK_CHECK_BUILTIN.bzip2:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.bzip2= YES
-.endif
-
-.if !defined(BUILDLINK_USE_BUILTIN.bzip2)
-. if !empty(BUILDLINK_IS_BUILTIN.bzip2:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.bzip2= YES
-. else
-BUILDLINK_USE_BUILTIN.bzip2= NO
-. endif
-
-. if !empty(PREFER_NATIVE:M[yY][eE][sS]) && \
- !empty(BUILDLINK_IS_BUILTIN.bzip2:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.bzip2= YES
-. endif
-. if !empty(PREFER_PKGSRC:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.bzip2= NO
-. endif
-. if !empty(PREFER_NATIVE:Mbzip2) && \
- !empty(BUILDLINK_IS_BUILTIN.bzip2:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.bzip2= YES
-. endif
-. if !empty(PREFER_PKGSRC:Mbzip2)
-BUILDLINK_USE_BUILTIN.bzip2= NO
-. endif
-
-. if defined(USE_BZIP2)
-BUILDLINK_USE_BUILTIN.bzip2= NO
-. endif
-.endif
-
-.if !empty(BUILDLINK_USE_BUILTIN.bzip2:M[nN][oO])
-. if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= bzip2
-. endif
-.endif
-
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff -r 9cc902b79a68 -r e9c1a9754cd0 archivers/bzip2/builtin.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/bzip2/builtin.mk Wed Mar 10 17:57:14 2004 +0000
@@ -0,0 +1,41 @@
+# $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $
+
+.if !defined(IS_BUILTIN.bzip2)
+IS_BUILTIN.bzip2= no
+. if exists(/usr/include/bzlib.h)
+IS_BUILTIN.bzip2!= \
+ if ${GREP} -q "BZ2_" /usr/include/bzlib.h; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. endif
+MAKEFLAGS+= IS_BUILTIN.bzip2=${IS_BUILTIN.bzip2}
+.endif
+
+CHECK_BUILTIN.bzip2?= no
+.if !empty(CHECK_BUILTIN.bzip2:M[yY][eE][sS])
+USE_BUILTIN.bzip2= yes
+.endif
+
+.if !defined(USE_BUILTIN.bzip2)
+USE_BUILTIN.bzip2?= ${IS_BUILTIN.bzip2}
+PREFER.bzip2?= pkgsrc
+
+. if defined(USE_BZIP2)
+. if !empty(IS_BUILTIN.bzip2:M[nN][oO]) || \
+ (${PREFER.bzip2} == "pkgsrc")
+USE_BUILTIN.bzip2= no
+. endif
+. endif
+
+# Solaris 9 has bzip2 1.0.1, build it on older versions.
+# Darwin only has a static libbz2.a.
+#
+_INCOMPAT_BZIP2?= SunOS-5.[678]-* Darwin-*
+. for _pattern_ in ${_INCOMPAT_BZIP2} ${INCOMPAT_BZIP2}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+USE_BUILTIN.bzip2= no
+. endif
+. endfor
+.endif # USE_BUILTIN.bzip2
diff -r 9cc902b79a68 -r e9c1a9754cd0 converters/libiconv/buildlink3.mk
--- a/converters/libiconv/buildlink3.mk Wed Mar 10 17:49:26 2004 +0000
+++ b/converters/libiconv/buildlink3.mk Wed Mar 10 17:57:14 2004 +0000
@@ -1,115 +1,18 @@
-# $NetBSD: buildlink3.mk,v 1.15 2004/02/18 16:35:27 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.16 2004/03/10 17:57:14 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
ICONV_BUILDLINK3_MK:= ${ICONV_BUILDLINK3_MK}+
-.include "../../mk/bsd.prefs.mk"
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= iconv
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Niconv}
+BUILDLINK_PACKAGES+= iconv
.if !empty(ICONV_BUILDLINK3_MK:M+)
-BUILDLINK_PACKAGES+= iconv
BUILDLINK_DEPENDS.iconv+= libiconv>=1.9.1
BUILDLINK_PKGSRCDIR.iconv?= ../../converters/libiconv
.endif # ICONV_BUILDLINK3_MK
-BUILDLINK_CHECK_BUILTIN.iconv?= NO
-
-_ICONV_H= /usr/include/iconv.h
-
-.if !defined(BUILDLINK_IS_BUILTIN.iconv)
-BUILDLINK_IS_BUILTIN.iconv= NO
-. if exists(${_ICONV_H})
-BUILDLINK_IS_BUILTIN.iconv= YES
-. endif
-. if !empty(BUILDLINK_CHECK_BUILTIN.iconv:M[nN][oO])
-_INCOMPAT_ICONV?= # should be set from defs.${OPSYS}.mk
-. for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
-BUILDLINK_IS_BUILTIN.iconv= NO
-. endif
-. endfor
-. endif
-.endif
-
-.if !empty(BUILDLINK_CHECK_BUILTIN.iconv:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.iconv= YES
-.endif
-
-.if !defined(BUILDLINK_USE_BUILTIN.iconv)
-. if !empty(BUILDLINK_IS_BUILTIN.iconv:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.iconv= YES
-. else
-BUILDLINK_USE_BUILTIN.iconv= NO
-. endif
-
-. if !empty(PREFER_NATIVE:M[yY][eE][sS]) && \
- !empty(BUILDLINK_IS_BUILTIN.iconv:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.iconv= YES
-. endif
-. if !empty(PREFER_PKGSRC:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.iconv= NO
-. endif
-. if !empty(PREFER_NATIVE:Miconv) && \
- !empty(BUILDLINK_IS_BUILTIN.iconv:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.iconv= YES
-. endif
-. if !empty(PREFER_PKGSRC:Miconv)
-BUILDLINK_USE_BUILTIN.iconv= NO
-. endif
-
-. if defined(USE_GNU_ICONV)
-BUILDLINK_USE_BUILTIN.iconv= NO
-. endif
-.endif
-
-.if !empty(BUILDLINK_USE_BUILTIN.iconv:M[nN][oO])
-. if !empty(BUILDLINK_DEPTH:M+)
-BUILDLINK_DEPENDS+= iconv
-. endif
-.endif
-
-.if !empty(ICONV_BUILDLINK3_MK:M+)
-. if !empty(BUILDLINK_USE_BUILTIN.iconv:M[nN][oO])
-_BLNK_LIBICONV= -liconv
-. else
-. if !defined(_BLNK_LIBICONV_FOUND)
-_BLNK_LIBICONV_FOUND!= \
- if [ "`${ECHO} /usr/lib/libiconv.*`" = "/usr/lib/libiconv.*" ]; then \
- ${ECHO} NO; \
- else \
- ${ECHO} YES; \
- fi
-MAKEFLAGS+= _BLNK_LIBICONV_FOUND=${_BLNK_LIBICONV_FOUND}
-. endif
-. if ${_BLNK_LIBICONV_FOUND} == "YES"
-_BLNK_LIBICONV= -liconv
-. else
-_BLNK_LIBICONV= # empty
-BUILDLINK_TRANSFORM+= l:iconv:
-. endif
-BUILDLINK_LDADD.iconv?= ${_BLNK_LIBICONV}
-. endif
-
-.if !defined(ICONV_TYPE)
-ICONV_TYPE?= gnu
-. if !empty(BUILDLINK_USE_BUILTIN.iconv:M[yY][eE][sS]) && \
- exists(${_ICONV_H})
-ICONV_TYPE!= \
- if ${GREP} -q "GNU LIBICONV Library" ${_ICONV_H}; then \
- ${ECHO} "gnu"; \
- else \
- ${ECHO} "native"; \
- fi
-. endif
-MAKEFLAGS+= ICONV_TYPE=${ICONV_TYPE}
-.endif
-
-. if defined(GNU_CONFIGURE)
-. if !empty(BUILDLINK_USE_BUILTIN.iconv:M[nN][oO])
-CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv}
-. else
-CONFIGURE_ARGS+= --without-libiconv-prefix
-. endif
-. endif
-.endif # ICONV_BUILDLINK3_MK
-
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff -r 9cc902b79a68 -r e9c1a9754cd0 converters/libiconv/builtin.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/libiconv/builtin.mk Wed Mar 10 17:57:14 2004 +0000
@@ -0,0 +1,78 @@
+# $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $
+
+.if !defined(_LIBICONV_FOUND)
+_LIBICONV_FOUND!= \
+ if [ "`${ECHO} /usr/lib/libiconv.*`" = "/usr/lib/libiconv.*" ]; then \
+ ${ECHO} "no"; \
+ else \
+ ${ECHO} "yes"; \
+ fi
+MAKEFLAGS+= _LIBICONV_FOUND=${_LIBICONV_FOUND}
+.endif
+
+_ICONV_H= /usr/include/iconv.h
+
+.if !defined(IS_BUILTIN.iconv)
+IS_BUILTIN.iconv= no
+. if exists(${_ICONV_H})
+IS_BUILTIN.iconv= yes
+. endif
+.endif
+
+CHECK_BUILTIN.iconv?= no
+.if !empty(CHECK_BUILTIN.iconv:M[yY][eE][sS])
+USE_BUILTIN.iconv= yes
+.endif
+
+.if !defined(USE_BUILTIN.iconv)
+USE_BUILTIN.iconv?= ${IS_BUILTIN.iconv}
+PREFER.iconv?= pkgsrc
+
+_INCOMPAT_ICONV?= # should be set from defs.${OPSYS}.mk
+. for _pattern_ in ${_INCOMPAT_ICONV} ${INCOMPAT_ICONV}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+USE_BUILTIN.iconv= no
+. endif
+. endfor
Home |
Main Index |
Thread Index |
Old Index