Added support for build_style=perl_module. That means that perl modules

now work on pkgfs.

While doing this work I added some new variables that can be used in
templates:

run_stuff_before="<stage>"
run_stuff_after="<stage>"
run_stuff_before_<stage>_file
run_stuff_after_<stage>_file

These can be used in a template when you need to do some stuff before
or after the stage specified, and the file will be read and the commands
on it executed.

Now that finally perl modules work, add the following templates:

intltool-0.40.4 and perl-XML-Parser-2.36.

Also mktmpl.sh has been updated to understand build_style=perl_module.

ENJOY!

--HG--
extra : convert_revision : 53c5148f1ba703e2b5af6e43f71668aac54a37d2
This commit is contained in:
Juan RP
2008-10-02 01:38:12 +02:00
parent 0220b27822
commit 0fdfc94802
12 changed files with 273 additions and 45 deletions

26
templates/intltool-0.40.4.tmpl Executable file
View File

@@ -0,0 +1,26 @@
# Template build file for 'intltool-0.40.4'.
pkgname=intltool-0.40.4
extract_sufx=".tar.bz2"
url=http://ftp.gnome.org/pub/GNOME/sources/intltool/0.40
build_style=gnu_configure
make_cmd="$PKGFS_MASTERDIR/bin/gmake"
short_desc="Toolbox for internationalisation"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=2d6bf321d83a6ac6967bad8f4439af7a14d84314
long_desc="
The intltool collection can be used to do these things:
o Extract translatable strings from various source files (.xml.in,
.glade, .desktop.in, .server.in, .oaf.in).
o Collect the extracted strings together with messages from traditional
source files (.c, .h) in po/\$(PACKAGE).pot.
o Merge back the translations from .po files into .xml, .desktop and
.oaf files. This merge step will happen at build resp. installation
time.
The intltool package has a script, intltoolize, which copies the various
scripts and does the other magic to your module. So users building
from tarballs don't need intltool, only folks building from cvs.
(This is modeled on gettextize.)"

View File

@@ -0,0 +1,16 @@
Do not hardcode rpath dirs into binaries or modules that would cause
unexpected results with pkgfs.
--- hints/netbsd.sh.orig 2008-10-02 01:03:43.000000000 +0200
+++ hints/netbsd.sh 2008-10-02 01:04:38.000000000 +0200
@@ -178,8 +178,8 @@ EOCBU
# Set sensible defaults for NetBSD: look for local software in
# /usr/pkg (NetBSD Packages Collection) and in /usr/local.
#
-loclibpth="/usr/pkg/lib /usr/local/lib"
-locincpth="/usr/pkg/include /usr/local/include"
+loclibpth=""
+locincpth=""
case "$rpathflag" in
'')
ldflags=

View File

@@ -1,5 +1,6 @@
# Template build file for 'perl-5.10.0'.
pkgname=perl-5.10.0
patch_files="perl-5.10.0-dont-hardcode-rpath.diff"
extract_sufx=".tar.gz"
url=http://www.cpan.org/src
configure_script="Configure"
@@ -19,3 +20,10 @@ long_desc="
procedural and object-oriented (OO) programming, has powerful built-in
support for text processing, and has one of the world's most impressive
collections of third-party modules."
# Perl needs to be handled specially and we have to transform some
# definitions to look at the correct directory.
run_stuff_before="build"
run_stuff_before_build_file="perl-runstuff-before-build.sh"
run_stuff_after="install"
run_stuff_after_install_file="perl-runstuff-after-install.sh"

View File

@@ -0,0 +1,15 @@
# Template build file for 'perl-XML-Parser-2.36'.
pkgname=perl-XML-Parser-2.36
distfiles="XML-Parser-2.36"
extract_sufx=".tar.gz"
url=http://cpan.perl.org/modules/by-module/XML
build_style=perl_module
make_build_args="EXPATLIBPATH=$PKGFS_MASTERDIR/lib
EXPATINCPATH=$PKGFS_MASTERDIR/include"
short_desc="Perl extension interface to James Clark's XML parser, expat"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=1c31a2398ada943efd5d2451389e163914168253
long_desc="
This module provides ways to parse XML documents. It is built on top of
XML::Parser::Expat, which is a lower level interface to James Clark's
expat library."

View File

@@ -0,0 +1,12 @@
# Fixup Config.pm to look at PKGFS_MASTERDIR, this helps modules
# to use correct dirs while building/installing them.
perl_version=5.10.0
perl_arch=$(uname -m)
perl_libdir=$PKGFS_DESTDIR/$pkgname/lib/perl5
config_pm=$perl_libdir/$perl_version/$perl_arch-netbsd-thread-multi/Config.pm
$sed_cmd -e "s|$PKGFS_DESTDIR\/$pkgname|$PKGFS_MASTERDIR|g" \
$config_pm > $config_pm.in
$chmod_cmd 444 $config_pm.in
$mv_cmd -f $config_pm.in $config_pm

View File

@@ -0,0 +1,6 @@
# This fixes the definitions that the perl binary uses to look at
# PKGFS_MASTERDIR and not PKGFS_DESTDIR!
$sed_cmd -e "s|$PKGFS_DESTDIR\/$pkgname|$PKGFS_MASTERDIR|g" \
$wrksrc/config.h > $wrksrc/config.h.in && \
$mv_cmd -f $wrksrc/config.h.in $wrksrc/config.h