Skip to content

Commit

Permalink
Allow for customised groups of packages at the top-level of pkgsrc.
Browse files Browse the repository at this point in the history
If SPECIFIC_PKGS is defined (at the top-level of pkgsrc), then instead of
looping through all the categories and then all the packages within that,
simply loop through ${SITE_SPECIFIC_PKGS}, ${HOST_SPECIFIC_PKGS},
${GROUP_SPECIFIC_PKGS} and ${USER_SPECIFIC_PKGS}, which are whitespace
separated lists of categories/packages e.g.
SITE_SPECIFIC_PKGS+= devel/cvs security/ssh
The default behaviour is unchanged - if SPECIFIC_PKGS is not defined,
the whole hierarchy will be traversed.

Modify mk.conf.example to reflect the settings of SPECIFIC_PKGS,
SITE_SPECIFIC_PKGS, HOST_SPECIFIC_PKGS, GROUP_SPECIFIC_PKGS and
USER_SPECIFIC_PKGS.

Modify the ispell package to use the make definition ISPELL_LANG,
rather than just LANG (which can clash with the environment variable
of the same name), and modify mk.conf.example accordingly.
  • Loading branch information
agc committed Feb 21, 1999
1 parent aa7216f commit 8e2ac8a
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 48 deletions.
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# $NetBSD: Makefile,v 1.18 1998/10/28 18:16:50 garbled Exp $
# $NetBSD: Makefile,v 1.19 1999/02/21 21:25:02 agc Exp $
# FreeBSD Id: Makefile,v 1.35 1997/08/19 07:10:01 fenner Exp
#

.include "mk/bsd.prefs.mk"

.ifdef SPECIFIC_PKGS
SUBDIR+= ${SITE_SPECIFIC_PKGS}
SUBDIR+= ${HOST_SPECIFIC_PKGS}
SUBDIR+= ${GROUP_SPECIFIC_PKGS}
SUBDIR+= ${USER_SPECIFIC_PKGS}
.else
#SUBDIR += ai
SUBDIR += archivers
#SUBDIR += astro
Expand Down Expand Up @@ -42,18 +50,19 @@ SUBDIR += textproc
#SUBDIR += vietnamese
SUBDIR += www
SUBDIR += x11
.endif

PKGSRCTOP= yes

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

index:
@rm -f ${.CURDIR}/INDEX
@make ${.CURDIR}/INDEX
@${MAKE} ${.CURDIR}/INDEX

${.CURDIR}/INDEX:
@echo -n "Generating INDEX - please wait.."
@make describe ECHO_MSG="echo > /dev/null" > ${.CURDIR}/INDEX
@${MAKE} describe ECHO_MSG="echo > /dev/null" > ${.CURDIR}/INDEX
@echo " Done."

print-index: ${.CURDIR}/INDEX
Expand All @@ -62,7 +71,8 @@ print-index: ${.CURDIR}/INDEX
search: ${.CURDIR}/INDEX
.if !defined(key)
@echo "The search target requires a keyword parameter,"
@echo "e.g.: \"make search key=somekeyword\""
@echo "e.g.: \"${MAKE} search key=somekeyword\""
.else
@grep ${key} ${.CURDIR}/INDEX | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArch:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10); }'
.endif

81 changes: 56 additions & 25 deletions mk/mk.conf.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: mk.conf.example,v 1.41 1999/02/15 19:23:38 tron Exp $
# $NetBSD: mk.conf.example,v 1.42 1999/02/21 21:25:03 agc Exp $
#
# Sample /etc/mk.conf file, which can be used to set specific values
# for building either NetBSD or some of the NetBSD packages collection.
Expand All @@ -16,6 +16,30 @@
# Possible: defined, not defined
# Default: not defined

#OBJMACHINE= 1 # use machine-specific object directories,
# e.g. work.i386, work.sparc
# Possible: defined, not defined
# Default: not defined

#WRKOBJDIR= /usr/tmp # build here instead of in pkgsrc
# Possible: defined, not defined
# Default: not defined

#UVM= 1 # Use the new UVM virtual memory subsystem
# Possible: defined, not defined
# Default: not defined

#USETBL= yes # Run raw manual pages through tbl(1) before
# piping through troff(1) when formatting
# manual pages.
# Possible: set, not set
# Default: not set


#
# The following values are used to manage the packages collection as a whole.
#

#LOCALBASE= /usr/local # Where non-X-based packages will be installed
# Possible: any path
# Default: /usr/pkg
Expand All @@ -41,23 +65,6 @@
# Possible: any path you like
# Default: /usr/pkgsrc/packages

#OBJMACHINE= 1 # use machine-specific object directories,
# e.g. work.i386, work.sparc
# Possible: defined, not defined
# Default: not defined

#WRKOBJDIR= /usr/tmp # build here instead of in pkgsrc
# Possible: defined, not defined
# Default: not defined

#UVM= 1 # Use the new UVM virtual memory subsystem
# Possible: defined, not defined
# Default: not defined

#MASTER_SITE_OVERRIDE= URL # Search for distfiles at the location
# specified by the URL first.
# Default: not defined

#PASSIVE_FETCH= 1 # Use ftp(1) in passive mode, for use behind
# filtering firewalls.
# (Set by default in ftp(1) in NetBSD-current)
Expand All @@ -73,18 +80,43 @@
# fee-based-commercial-use
# Default: none

#SPECIFIC_PKGS= yes # Don't use the default of all packages (from the
# top-level of the pkgsrc tree), and use the
# values of the definitions SITE_SPECIFIC_PKGS,
# HOST_SPECIFIC_PKGS, GROUP_SPECIFIC_PKGS, and
# USER_SPECIFIC_PKGS.

#SITE_SPECIFIC_PKGS= # List of packages that are wanted for each
# host on the site. Each package in the list
# is of the form <category>/<package>.
# Possible: any combination of packages
# Default: not set

#HOST_SPECIFIC_PKGS= # List of packages that are wanted for this
# particular host/machine. Each package in the
# list is of the form <category>/<package>.
# Possible: any combination of packages
# Default: not set

#GROUP_SPECIFIC_PKGS= # List of packages that are wanted for this
# group of users. Each package in the list
# is of the form <category>/<package>.
# Possible: any combination of packages
# Default: not set

#USER_SPECIFIC_PKGS= # List of packages that are wanted for this
# particular user. Each package in the list
# is of the form <category>/<package>.
# Possible: any combination of packages
# Default: not set

#FAILOVER_FETCH= yes # Perform a checksum at "make fetch" time.
# If the checksum doesn't match the stored
# value, try to retrieve the file from the
# next site in the list
# Possible: set, not set
# Default: not set

#USETBL= yes # Run raw manual pages through tbl(1) before
# piping through troff(1) when formatting
# manual pages.
# Possible: set, not set
# Default: not set



Expand Down Expand Up @@ -127,10 +159,9 @@
# Possible: defined, not defined
# Default: not defined

#LANG= # Used by ispell to specify national dictionary
#ISPELL_LANG= # Used by ispell to specify national dictionary
# Possible: not defined, british
# Default: not defined
# [agc - this must conflict with the locale?]

#LIBWRAP_FWD= # Make libwrap also compare against forwards
# Possible: not defined, YES
Expand Down
39 changes: 20 additions & 19 deletions textproc/ispell/Makefile
Original file line number Diff line number Diff line change
@@ -1,65 +1,66 @@
# $NetBSD: Makefile,v 1.15 1998/12/21 00:35:59 frueauf Exp $
# $NetBSD: Makefile,v 1.16 1999/02/21 21:25:03 agc Exp $
# FreeBSD Id: Makefile,v 1.21 1997/08/13 23:29:52 jmz Exp
#

DISTNAME= ispell-3.1.20
WRKSRC= ${WRKDIR}/ispell-3.1
CATEGORIES= textproc
MASTER_SITES= ftp://ftp.cs.ucla.edu/pub/ispell-3.1/

MAINTAINER= [email protected]
HOMEPAGE= http://www.gnu.org/software/ispell/ispell.html

WRKSRC= ${WRKDIR}/ispell-3.1

MAKE_FLAGS= TMPDIR=${WRKDIR}
SCRIPTS_ENV= "LANG=${LANG}"
SCRIPTS_ENV= "LANG=${ISPELL_LANG}"

USE_GTEXINFO= yes
INFO_FILES= ispell.info

.include "../../mk/bsd.prefs.mk"

_INTTYPES!= if [ -e /usr/include/inttypes.h ]; then echo "Exists"; else echo "No go"; fi
_INTTYPES!= if [ -e /usr/include/inttypes.h ]; then ${ECHO} "Exists"; else ${ECHO} "No go"; fi

.if (${_INTTYPES} == "Exists")
CFLAGS+= -DHAVE_INTTYPES_H
.endif

pre-extract pre-build pre-install:
.if !defined(ISPELL_FR)
@echo '******************************************************'
@echo '* Note that you can build a french/english version *'
@echo '* by typing "make french" *'
@echo '******************************************************'
@${ECHO} '******************************************************'
@${ECHO} '* Note that you can build a french/english version *'
@${ECHO} '* by typing "make french" *'
@${ECHO} '******************************************************'
.else
EXTRA_DICT= francais-IREQ-1.4.tar.gz
MASTER_SITES+= ftp://ftp.robot.ireq.ca/pub/ispell/
DISTFILES+= ${EXTRA_DICT}
.endif

pre-extract:
.if !defined(LANG)
@echo '******************************************************'
@echo '* Note that you can build a british version by *'
@echo '* typing "make british" following a "make clean" *'
@echo '******************************************************'
.if !defined(ISPELL_LANG)
@${ECHO} '******************************************************'
@${ECHO} '* Note that you can build a british version by *'
@${ECHO} '* typing "make british" following a "make clean" *'
@${ECHO} '******************************************************'
.endif

pre-configure:
.if defined(EXTRA_DICT)
@echo ${EXTRA_DICT} > ${WRKDIR}/extra_dict
@${ECHO} ${EXTRA_DICT} > ${WRKDIR}/extra_dict
.else
@echo -n
@${ECHO} -n
.endif

post-configure:
@echo "#define CFLAGS \"${CFLAGS}\"" >> ${WRKSRC}/local.h
@${ECHO} "#define CFLAGS \"${CFLAGS}\"" >> ${WRKSRC}/local.h

british:
@echo "Okay, making a british version of ispell...."
@${MAKE} ${.MAKEFLAGS} LANG=british all
@${ECHO} "Okay, making a british version of ispell...."
@${MAKE} ${.MAKEFLAGS} ISPELL_LANG=british all

french:
@echo "Okay, making a french/english version of ispell...."
@${ECHO} "Okay, making a french/english version of ispell...."
@${MAKE} ${.MAKEFLAGS} ISPELL_FR=yes

pre-install:
Expand Down

0 comments on commit 8e2ac8a

Please sign in to comment.