Subject: buildlink-ifying some packages
To: None <tech-pkg@netbsd.org>
From: Eric Gillespie, Jr. <epg@pretzelnet.org>
List: tech-pkg
Date: 10/02/2001 22:41:44
Hi, first time i've posted here, but i've submitted new packages
and package updates in the past.  I'm a Debian project member and
OpenPackages committer interested in working on NetBSD pkgsrc.

So, when i went to package Gabber when i noticed that most of the
GNOME libraries do not use buildlink.  I've decided to fix that,
so this message is a heads-up to avoid duplication of effort but
also a request for review.

I've been a client of buildlink.mk files before, but i haven't
written one until now.  Below are the new Makefile and
buildlink.mk files for textproc/libunicode.  Please let me know
if this looks right.  If so, i'll send-pr(1).

I tested this by making gnome-print USE_BUILDLINK_ONLY and
including x11.buildlink.mk.

So unless someone complains and as long as i know what i'm doing,
i'll tackle all the other GNOME libraries (gal, eel, gnome--, a
bizillion others).

Thanks.

# $NetBSD$
#

DISTNAME=	libunicode-0.4
CATEGORIES=	textproc devel
MASTER_SITES=	${MASTER_SITE_GNOME:=unstable/sources/libunicode/}

MAINTAINER=	rh@netbsd.org
HOMEPAGE=	http://www.pango.org/
COMMENT=	library for manipulating Unicode characters and strings

USE_BUILDLINK_ONLY=	# defined
REPLACE_BUILDLINK=	unicode-config

GNU_CONFIGURE=	YES
USE_LIBTOOL=	YES

LTCONFIG_OVERRIDE=	${WRKSRC}/ltconfig

.include "../../mk/bsd.pkg.mk"

*******************************************************************************
*******************************************************************************

# $NetBSD$
#
# This Makefile fragment is included by packages that use libunicode.
#
# To use this Makefile fragment, simply:
#
# (1) Optionally define BUILDLINK_DEPENDS.gkd-pixbuf to the dependency version
#     for the version of libunicode desired.
# (2) Include this Makefile fragment in the package Makefile,
# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
#     search path, and
# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
#     path.

.if !defined(LIBUNICODE_BUILDLINK_MK)
LIBUNICODE_BUILDLINK_MK=	# defined

.include "../../mk/bsd.buildlink.mk"

BUILDLINK_DEPENDS.libunicode?=	libunicode>=0.4
DEPENDS+=	${BUILDLINK_DEPENDS.libunicode}:../../textproc/libunicode

EVAL_PREFIX+=			BUILDLINK_PREFIX.libunicode=libunicode
BUILDLINK_PREFIX.libunicode_DEFAULT=	${LOCALBASE}
BUILDLINK_FILES.libunicode=	include/unicode.h
BUILDLINK_FILES.libunicode+=	lib/libunicode.*

BUILDLINK_TARGETS.libunicode=	libunicode-buildlink
BUILDLINK_TARGETS.libunicode+=	libunicode-buildlink-config-wrapper
BUILDLINK_TARGETS+=		${BUILDLINK_TARGETS.libunicode}

BUILDLINK_CONFIG.libunicode=	\
			${BUILDLINK_PREFIX.libunicode}/bin/unicode-config
BUILDLINK_CONFIG_WRAPPER.libunicode=	\
			${BUILDLINK_DIR}/bin/unicode-config

.if defined(USE_CONFIG_WRAPPER)
LIBUNICODE_CONFIG?=		${BUILDLINK_CONFIG_WRAPPER.libunicode}
CONFIGURE_ENV+=			LIBUNICODE_CONFIG="${LIBUNICODE_CONFIG}"
MAKE_ENV+=			LIBUNICODE_CONFIG="${LIBUNICODE_CONFIG}"
.endif

pre-configure: ${BUILDLINK_TARGETS.libunicode}
libunicode-buildlink: _BUILDLINK_USE
libunicode-buildlink-config-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE

.endif	# LIBUNICODE_BUILDLINK_MK

-- 
Eric Gillespie, Jr.
mailto:epg@pretzelnet.org <*> jabber:pretzelgod@jabber.org

"This movie sure is gory!"
"Yeah, but that's one cute pig."