Fix installation on PREFIX != /usr/local

Reported by:	krismail
This commit is contained in:
Renato Botelho 2005-10-17 13:52:12 +00:00
parent 1388438a59
commit dfb35d8f89
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=145658
2 changed files with 17 additions and 10 deletions

View file

@ -27,12 +27,16 @@ MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION}
MAKE_ENV= PERL_VER=${PERL_VER} PERL5=${PERL5}
pre-patch:
@${PERL} -pi -e 's!/usr/local/X11R6.3!${PREFIX}!' ${WRKSRC}/FreeType/Makefile.PL
post-patch:
.for VAR in LOCALBASE PREFIX
@${PERL} -pi -e 's!%%${VAR}%%!${${VAR}}!g' \
${WRKSRC}/FreeType/Makefile.PL
.endfor
post-build:
.for DIST in ftinfo mkttfdir
@${PERL} -pi -e 's;^#! */usr/local/bin/perl *;#!${PERL5};' ${WRKSRC}/${DIST}
@${PERL} -pi -e 's;^#! */usr/local/bin/perl *;#!${PERL5};' \
${WRKSRC}/${DIST}
.endfor
.include <bsd.port.mk>

View file

@ -1,10 +1,13 @@
--- FreeType/Makefile.PL.orig Wed Jan 10 14:50:46 2001
+++ FreeType/Makefile.PL Wed Jan 10 14:51:19 2001
@@ -6,5 +6,5 @@
--- FreeType/Makefile.PL.orig Mon Dec 14 02:13:26 1998
+++ FreeType/Makefile.PL Mon Oct 17 11:47:15 2005
@@ -4,7 +4,8 @@
WriteMakefile(
'NAME' => 'FreeType',
'VERSION_FROM' => 'FreeType.pm', # finds $VERSION
'LIBS' => ['-L/usr/local/lib -lttf'], # e.g., '-lm'
- 'LIBS' => ['-L/usr/local/X11R6.3/lib -lttf'], # e.g., '-lm'
+ 'LIBS' => ['-L%%LOCALBASE%%/lib -lttf'], # e.g., '-lm'
+ 'PREFIX' => '%%PREFIX%%',
'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
- 'INC' => '-I/usr/local/include', # e.g., '-I/usr/include/other'
+ 'INC' => '-I/usr/local/include/freetype1/freetype', # e.g., '-I/usr/include/other'
- 'INC' => '-I/usr/local/X11R6.3/include', # e.g., '-I/usr/include/other'
+ 'INC' => '-I%%LOCALBASE%%/include/freetype1/freetype', # e.g., '-I/usr/include/other'
);