mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
- Convert USE_AUTOTOOLS=libtool to USES=libtool.
- Replace PERL with REINPLACE_CMD in post-patch. - Replace "iconv.h" with "${ICONV_PREFIX}/include/iconv.h" so /usr/include/iconv.h is included on FreeBSD 10 even when converters/iconv is installed. The port uses iconvctl(3) which isn't declared in /usr/local/include/iconv.h with -DLIBICONV_PLUG. - files/patch-lib-error.c: Implement program_name using __progname. - files/patch-libiconv-Makefile.in: deleted because the libiconv directory isn't built. - files/patch-src-Makefile.in: + Remove chunks that aren't needed. + Remove ../lib/libreco.a from LIBS so CFLAGS+=-fPIC can be removed from the port Makefile. Instead, just copy lib/error.c (the only file needed from libreco.a) to src/error.c and compile it into librecode.so. PR: 186637 Approved by: demon (maintainer)
This commit is contained in:
parent
2d435bccd1
commit
284d283afe
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=344949
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= recode
|
||||
PORTVERSION= 3.6
|
||||
PORTREVISION= 9
|
||||
PORTREVISION= 10
|
||||
CATEGORIES= converters
|
||||
MASTER_SITES= ${MASTER_SITE_GNU}
|
||||
MASTER_SITE_SUBDIR= recode
|
||||
@ -11,14 +11,13 @@ MASTER_SITE_SUBDIR= recode
|
||||
MAINTAINER= demon@FreeBSD.org
|
||||
COMMENT= Converts files between character sets and usages
|
||||
|
||||
USES= gettext iconv perl5
|
||||
USE_AUTOTOOLS= libtool
|
||||
USE_PERL5= patch run build
|
||||
GNU_CONFIGURE= yes
|
||||
USES= gettext iconv libtool perl5
|
||||
USE_PERL5= run build
|
||||
USE_LDCONFIG= yes
|
||||
CONFIGURE_ARGS= --without-included-gettext
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
|
||||
CFLAGS+= -fPIC
|
||||
|
||||
INFO= recode
|
||||
|
||||
@ -27,11 +26,13 @@ post-extract:
|
||||
@${RM} -f ${WRKSRC}/doc/${PORTNAME}.info*
|
||||
|
||||
post-patch:
|
||||
@${PERL} -pi -e '\
|
||||
if (/Project-Id-Version/) { \
|
||||
@${REINPLACE_CMD} -E \
|
||||
'/Project-Id-Version/ { \
|
||||
s/3\.[45](r|\.[0-9])?/3.6/; \
|
||||
s/: (Free )?recode/: GNU recode/; \
|
||||
} \
|
||||
' ${WRKSRC}/i18n/*.po
|
||||
s/: (Free )?recode/: GNU recode/; }' \
|
||||
${WRKSRC}/i18n/*.po
|
||||
@${REINPLACE_CMD} 's,"iconv\.h","${ICONV_PREFIX}/include/iconv.h",' \
|
||||
${WRKSRC}/src/libiconv.c
|
||||
@${CP} ${WRKSRC}/lib/error.c ${WRKSRC}/src
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,28 +1,12 @@
|
||||
--- lib/error.c.orig Thu Aug 3 03:21:13 2000
|
||||
+++ lib/error.c Thu Apr 17 00:29:29 2003
|
||||
@@ -25,6 +25,16 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
+# ifdef __FreeBSD__
|
||||
+# include <sys/types.h>
|
||||
+# include <sys/exec.h>
|
||||
+# include <sys/param.h>
|
||||
+# include <vm/vm.h>
|
||||
+# include <vm/vm_param.h>
|
||||
+# include <vm/pmap.h>
|
||||
+# include <vm/swap_pager.h>
|
||||
+# endif
|
||||
+
|
||||
#include <stdio.h>
|
||||
|
||||
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
|
||||
@@ -80,7 +90,11 @@
|
||||
@@ -80,7 +80,12 @@
|
||||
|
||||
/* The calling program should define program_name and set it to the
|
||||
name of the executing program. */
|
||||
+# ifdef __FreeBSD__
|
||||
+# define program_name *((struct ps_strings *)PS_STRINGS)->ps_argvstr
|
||||
+extern char *__progname;
|
||||
+# define program_name __progname
|
||||
+# else
|
||||
extern char *program_name;
|
||||
+# endif
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- libiconv/Makefile.in.orig Fri Oct 5 01:32:06 2001
|
||||
+++ libiconv/Makefile.in Fri Oct 5 01:33:06 2001
|
||||
@@ -112,8 +112,8 @@
|
||||
EXTRA_DIST = encodings.def encodings_local.def config.charset ref-add.sin ref-del.sin
|
||||
|
||||
|
||||
-charset_alias = $(DESTDIR)$(libdir)/charset.alias
|
||||
-charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
|
||||
+charset_alias = $(DESTDIR)$(prefix)/libdata/charset.alias
|
||||
+charset_tmp = $(DESTDIR)$(prefix)/libdata/charset.tmp
|
||||
|
||||
SUFFIXES = .sed .sin
|
||||
|
@ -1,11 +1,8 @@
|
||||
--- src/Makefile.in
|
||||
+++ src/Makefile.in
|
||||
@@ -129,11 +129,11 @@ L_SURFACES =
|
||||
recode_SOURCES = main.c freeze.c mixed.c
|
||||
recode_LDADD = librecode.la ../lib/libreco.a
|
||||
@@ -131,9 +131,9 @@ L_SURFACES =
|
||||
|
||||
-librecode_la_SOURCES = argmatch.c charname.c combine.c fr-charname.c hash.c iconv.c libiconv.c localcharset.c merged.c names.c outer.c quotearg.c recode.c request.c strip-pool.c task.c xmalloc.c $(C_STEPS)
|
||||
+librecode_la_SOURCES = argmatch.c charname.c combine.c fr-charname.c hash.c libiconv.c localcharset.c merged.c names.c outer.c quotearg.c recode.c request.c strip-pool.c task.c xmalloc.c $(C_STEPS)
|
||||
librecode_la_SOURCES = argmatch.c charname.c combine.c fr-charname.c hash.c iconv.c libiconv.c localcharset.c merged.c names.c outer.c quotearg.c recode.c request.c strip-pool.c task.c xmalloc.c $(C_STEPS)
|
||||
|
||||
-librecode_la_LDFLAGS = -version-info 0:0:0
|
||||
+librecode_la_LDFLAGS = -version-info 3:6:0
|
||||
@ -15,100 +12,12 @@
|
||||
DEFS = -DLIBDIR=\"$(libdir)\" @DEFS@
|
||||
|
||||
ETAGS_ARGS = $(L_STEPS)
|
||||
@@ -153,11 +153,11 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
-LIBS = @LIBS@
|
||||
+LIBS = @LIBS@ ../lib/libreco.a
|
||||
@@ -157,7 +157,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
ANSI2KNR = @ANSI2KNR@
|
||||
librecode_la_LIBADD =
|
||||
librecode_la_OBJECTS = argmatch$U.lo charname$U.lo combine$U.lo \
|
||||
-fr-charname$U.lo hash$U.lo iconv$U.lo libiconv$U.lo localcharset$U.lo \
|
||||
+fr-charname$U.lo hash$U.lo libiconv$U.lo localcharset$U.lo \
|
||||
+fr-charname$U.lo hash$U.lo error$U.lo libiconv$U.lo localcharset$U.lo \
|
||||
merged$U.lo names$U.lo outer$U.lo quotearg$U.lo recode$U.lo \
|
||||
request$U.lo strip-pool$U.lo task$U.lo xmalloc$U.lo african$U.lo \
|
||||
afrtran$U.lo applemac$U.lo atarist$U.lo bangbang$U.lo cdcnos$U.lo \
|
||||
@@ -359,8 +359,6 @@ ibmpc_.c: ibmpc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ibmpc.c; then echo $(srcdir)/ibmpc.c; else echo ibmpc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ibmpc_.c
|
||||
iconqnx_.c: iconqnx.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/iconqnx.c; then echo $(srcdir)/iconqnx.c; else echo iconqnx.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > iconqnx_.c
|
||||
-iconv_.c: iconv.c $(ANSI2KNR)
|
||||
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/iconv.c; then echo $(srcdir)/iconv.c; else echo iconv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > iconv_.c
|
||||
lat1asci_.c: lat1asci.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lat1asci.c; then echo $(srcdir)/lat1asci.c; else echo lat1asci.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lat1asci_.c
|
||||
lat1ltex_.c: lat1ltex.c $(ANSI2KNR)
|
||||
@@ -425,7 +423,7 @@ bangbang_.lo base64_.o base64_.lo cdcnos_.o cdcnos_.lo charname_.o \
|
||||
charname_.lo combine_.o combine_.lo dump_.o dump_.lo ebcdic_.o \
|
||||
ebcdic_.lo endline_.o endline_.lo flat_.o flat_.lo fr-charname_.o \
|
||||
fr-charname_.lo freeze_.o freeze_.lo hash_.o hash_.lo html_.o html_.lo \
|
||||
-ibmpc_.o ibmpc_.lo iconqnx_.o iconqnx_.lo iconv_.o iconv_.lo \
|
||||
+ibmpc_.o ibmpc_.lo iconqnx_.o iconqnx_.lo \
|
||||
lat1asci_.o lat1asci_.lo lat1ltex_.o lat1ltex_.lo lat1txte_.o \
|
||||
lat1txte_.lo libiconv_.o libiconv_.lo localcharset_.o localcharset_.lo \
|
||||
main_.o main_.lo merged_.o merged_.lo mixed_.o mixed_.lo mule_.o \
|
||||
@@ -575,64 +573,6 @@ ibmpc.lo ibmpc.o : ibmpc.c common.h ../config.h xalloc.h argmatch.h \
|
||||
../lib/error.h recodext.h recode.h
|
||||
iconqnx.lo iconqnx.o : iconqnx.c common.h ../config.h xalloc.h \
|
||||
argmatch.h ../lib/error.h recodext.h recode.h
|
||||
-iconv.lo iconv.o : iconv.c common.h ../config.h xalloc.h argmatch.h \
|
||||
- ../lib/error.h recodext.h recode.h ../libiconv/iconv.h \
|
||||
- ../libiconv/libcharset.h ../libiconv/converters.h \
|
||||
- ../libiconv/ascii.h ../libiconv/utf8.h ../libiconv/ucs2.h \
|
||||
- ../libiconv/ucs2be.h ../libiconv/ucs2le.h ../libiconv/ucs4.h \
|
||||
- ../libiconv/ucs4be.h ../libiconv/ucs4le.h ../libiconv/utf16.h \
|
||||
- ../libiconv/utf16be.h ../libiconv/utf16le.h ../libiconv/utf7.h \
|
||||
- ../libiconv/ucs2internal.h ../libiconv/ucs2swapped.h \
|
||||
- ../libiconv/ucs4internal.h ../libiconv/ucs4swapped.h \
|
||||
- ../libiconv/java.h ../libiconv/iso8859_1.h \
|
||||
- ../libiconv/iso8859_2.h ../libiconv/iso8859_3.h \
|
||||
- ../libiconv/iso8859_4.h ../libiconv/iso8859_5.h \
|
||||
- ../libiconv/iso8859_6.h ../libiconv/iso8859_7.h \
|
||||
- ../libiconv/iso8859_8.h ../libiconv/iso8859_9.h \
|
||||
- ../libiconv/iso8859_10.h ../libiconv/iso8859_13.h \
|
||||
- ../libiconv/iso8859_14.h ../libiconv/iso8859_15.h \
|
||||
- ../libiconv/iso8859_16.h ../libiconv/koi8_r.h \
|
||||
- ../libiconv/koi8_u.h ../libiconv/koi8_ru.h ../libiconv/cp1250.h \
|
||||
- ../libiconv/cp1251.h ../libiconv/cp1252.h ../libiconv/cp1253.h \
|
||||
- ../libiconv/cp1254.h ../libiconv/cp1255.h ../libiconv/cp1256.h \
|
||||
- ../libiconv/cp1257.h ../libiconv/cp1258.h ../libiconv/cp850.h \
|
||||
- ../libiconv/cp866.h ../libiconv/mac_roman.h \
|
||||
- ../libiconv/mac_centraleurope.h ../libiconv/mac_iceland.h \
|
||||
- ../libiconv/mac_croatian.h ../libiconv/mac_romania.h \
|
||||
- ../libiconv/mac_cyrillic.h ../libiconv/mac_ukraine.h \
|
||||
- ../libiconv/mac_greek.h ../libiconv/mac_turkish.h \
|
||||
- ../libiconv/mac_hebrew.h ../libiconv/mac_arabic.h \
|
||||
- ../libiconv/mac_thai.h ../libiconv/hp_roman8.h \
|
||||
- ../libiconv/nextstep.h ../libiconv/armscii_8.h \
|
||||
- ../libiconv/georgian_academy.h ../libiconv/georgian_ps.h \
|
||||
- ../libiconv/mulelao.h ../libiconv/cp1133.h ../libiconv/tis620.h \
|
||||
- ../libiconv/cp874.h ../libiconv/viscii.h ../libiconv/tcvn.h \
|
||||
- ../libiconv/iso646_jp.h ../libiconv/jisx0201.h \
|
||||
- ../libiconv/jisx0208.h ../libiconv/jisx0212.h \
|
||||
- ../libiconv/iso646_cn.h ../libiconv/gb2312.h \
|
||||
- ../libiconv/isoir165.h ../libiconv/isoir165ext.h \
|
||||
- ../libiconv/gbk.h ../libiconv/gbkext1.h ../libiconv/gbkext2.h \
|
||||
- ../libiconv/gbkext_inv.h ../libiconv/cp936ext.h \
|
||||
- ../libiconv/cns11643.h ../libiconv/cns11643_1.h \
|
||||
- ../libiconv/cns11643_2.h ../libiconv/cns11643_3.h \
|
||||
- ../libiconv/cns11643_inv.h ../libiconv/big5.h \
|
||||
- ../libiconv/ksc5601.h ../libiconv/johab_hangul.h \
|
||||
- ../libiconv/euc_jp.h ../libiconv/sjis.h ../libiconv/cp932.h \
|
||||
- ../libiconv/cp932ext.h ../libiconv/iso2022_jp.h \
|
||||
- ../libiconv/iso2022_jp1.h ../libiconv/iso2022_jp2.h \
|
||||
- ../libiconv/euc_cn.h ../libiconv/ces_gbk.h \
|
||||
- ../libiconv/gb18030.h ../libiconv/gb18030ext.h \
|
||||
- ../libiconv/gb18030uni.h ../libiconv/iso2022_cn.h \
|
||||
- ../libiconv/iso2022_cnext.h ../libiconv/hz.h \
|
||||
- ../libiconv/euc_tw.h ../libiconv/ces_big5.h ../libiconv/cp950.h \
|
||||
- ../libiconv/cp950ext.h ../libiconv/big5hkscs.h \
|
||||
- ../libiconv/hkscs.h ../libiconv/euc_kr.h ../libiconv/cp949.h \
|
||||
- ../libiconv/uhc_1.h ../libiconv/uhc_2.h ../libiconv/johab.h \
|
||||
- ../libiconv/iso2022_kr.h ../libiconv/cjk_variants.h \
|
||||
- ../libiconv/translit.h ../libiconv/encodings.def \
|
||||
- ../libiconv/encodings_local.def ../libiconv/flags.h \
|
||||
- ../libiconv/loops.h ../libiconv/loop_unicode.h \
|
||||
- ../libiconv/loop_wchar.h ../libiconv/aliases.h
|
||||
lat1asci.lo lat1asci.o : lat1asci.c common.h ../config.h xalloc.h \
|
||||
argmatch.h ../lib/error.h recodext.h recode.h
|
||||
lat1ltex.lo lat1ltex.o : lat1ltex.c common.h ../config.h xalloc.h \
|
||||
|
@ -5,6 +5,7 @@ lib/librecode.a
|
||||
lib/librecode.la
|
||||
lib/librecode.so
|
||||
lib/librecode.so.3
|
||||
lib/librecode.so.3.0.6
|
||||
man/man1/recode.1.gz
|
||||
share/locale/da/LC_MESSAGES/recode.mo
|
||||
share/locale/de/LC_MESSAGES/recode.mo
|
||||
|
Loading…
Reference in New Issue
Block a user