Skip to content

Instantly share code, notes, and snippets.

@fingolfin
Created June 14, 2012 21:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fingolfin/2932949 to your computer and use it in GitHub Desktop.
Save fingolfin/2932949 to your computer and use it in GitHub Desktop.
Fink readline6 package
Info4: <<
Package: readline6%type_pkg[-64bit]
Version: 6.2
Revision: 1
Maintainer: Fink Core Group <fink-core@lists.sourceforge.net>
Type: -64bit (boolean)
Architecture: ( %type_raw[-64bit] = -64bit ) powerpc, ( %type_raw[-64bit] = -64bit ) i386
#
Depends: %n-shlibs (= %v-%r), ( %type_raw[-64bit] = -64bit ) 64bit-cpu
BuildDepends: <<
fink (>= 0.24.12),
fink-package-precedence,
libncurses5%type_pkg[-64bit] (>= 5.4-20041023-1006)
<<
Conflicts: readline, readline5, readline5-64bit, readline6, readline6-64bit
Replaces: readline, readline5, readline5-64bit, readline6, readline6-64bit
Source: mirror:gnu:readline/readline-%v.tar.gz
Source2: mirror:gnu:readline/readline-%v-patches/readline62-001
Source3: mirror:gnu:readline/readline-%v-patches/readline62-002
Source-MD5: 67948acb2ca081f23359d0256e9a271c
Source2-MD5: 83287d52a482f790dfb30ec0a8746669
Source3-MD5: 0665020ea118e8434bd145fb71f452cc
PatchFile: %{ni}.patch
PatchFile-MD5: 07d01b8f187c7ff238450a6448ffe67a
PatchScript: <<
patch -p0 < ../readline62-001
patch -p0 < ../readline62-002
%{default_script}
<<
SetCFLAGS: -DNEED_EXTERN_PC=1
SetCPPFLAGS: -MD
CompileScript: <<
#! /bin/sh -ev
if [ "%type_raw[-64bit]" != "." ]; then
export CC="gcc -m64"
fi
./configure %c
make
fink-package-precedence --depfile-ext='\.d' --prohibit-bdep=%n .
<<
InstallScript: make install DESTDIR=%d
DocFiles: NEWS CHANGELOG CHANGES COPYING README USAGE
InfoDocs: history.info readline.info rluserman.info
BuildDependsOnly: True
SplitOff: <<
Package: %N-shlibs
Depends: libncurses5%type_pkg[-64bit]-shlibs (>= 5.4-20041023-1006), ( %type_raw[-64bit] = -64bit ) 64bit-cpu
Replaces: %N
Files: %lib/libhistory.6.2.dylib %lib/libreadline.6.2.dylib %lib/libhistory.6.dylib %lib/libreadline.6.dylib
Shlibs: <<
%p/%lib/libhistory.6.dylib 6.0.0 %n (>= 6.2-1) %type_num[-64bit]
%p/%lib/libreadline.6.dylib 6.0.0 %n (>= 6.2-1) %type_num[-64bit]
<<
DocFiles: NEWS CHANGELOG CHANGES COPYING README USAGE
<<
#
Description: Comfortable terminal input library
DescDetail: <<
The GNU Readline library provides a set of functions for use by
applications that allow users to edit command lines as they are typed
in. Both Emacs and vi editing modes are available. The Readline
library includes additional functions to maintain a list of
previously-entered command lines, to recall and perhaps reedit those
lines, and perform csh-like history expansion on previous commands.
<<
DescPort: <<
1) fix the --install-name flag to only specify the major version
2) dmacks: patch doc/Makefile.in to skip even trying to create
texinfo dir file
3) dmacks: installing into empty %d, so don't try to remove old .a
<<
License: GPL
Homepage: http://tiswww.case.edu/php/chet/readline/rltop.html
<<
diff -ru readline-6.2/Makefile.in readline-6.2-patched/Makefile.in
--- readline-6.2/Makefile.in 2010-10-11 17:53:52.000000000 +0200
+++ readline-6.2-patched/Makefile.in 2012-06-14 22:35:58.000000000 +0200
@@ -83,7 +83,7 @@
# For libraries which include headers from other libraries.
INCLUDES = -I. -I$(srcdir)
-XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES)
+XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS)
CCFLAGS = $(XCCFLAGS) $(LOCAL_CFLAGS) $(CFLAGS)
# could add -Werror here
@@ -225,10 +225,8 @@
maybe-uninstall-headers: uninstall-headers
install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-examples
- -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old
$(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
- -$(MV) $(DESTDIR)$(libdir)/libhistory.a $(DESTDIR)$(libdir)/libhistory.old
$(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory.a
diff -ru readline-6.2/doc/Makefile.in readline-6.2-patched/doc/Makefile.in
--- readline-6.2/doc/Makefile.in 2009-12-23 16:42:59.000000000 +0100
+++ readline-6.2-patched/doc/Makefile.in 2012-06-14 22:36:31.000000000 +0200
@@ -215,14 +215,6 @@
else \
${INSTALL_DATA} $(srcdir)/history.info $(DESTDIR)$(infodir)/history.info; \
fi
- -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
- install-info --dir-file=$(DESTDIR)$(infodir)/dir \
- $(DESTDIR)$(infodir)/readline.info ; \
- install-info --dir-file=$(DESTDIR)$(infodir)/dir \
- $(DESTDIR)$(infodir)/history.info ; \
- install-info --dir-file=$(DESTDIR)$(infodir)/dir \
- $(DESTDIR)$(infodir)/rluserman.info ; \
- else true; fi
-${INSTALL_DATA} $(srcdir)/readline.3 $(DESTDIR)$(man3dir)/readline$(man3ext)
-${INSTALL_DATA} $(srcdir)/history.3 $(DESTDIR)$(man3dir)/history$(man3ext)
-if test -n "${htmldir}" ; then \
diff -ru readline-6.2/examples/Makefile.in readline-6.2-patched/examples/Makefile.in
--- readline-6.2/examples/Makefile.in 2010-12-28 21:55:32.000000000 +0100
+++ readline-6.2-patched/examples/Makefile.in 2012-06-14 22:35:12.000000000 +0200
@@ -53,7 +53,7 @@
INCLUDES = -I$(srcdir) -I$(top_srcdir) -I..
-CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS)
+CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LDFLAGS = -g -L.. @LDFLAGS@
PURIFY = @PURIFY@
diff -ru readline-6.2/shlib/Makefile.in readline-6.2-patched/shlib/Makefile.in
--- readline-6.2/shlib/Makefile.in 2010-12-28 21:56:21.000000000 +0100
+++ readline-6.2-patched/shlib/Makefile.in 2012-06-14 22:34:55.000000000 +0200
@@ -107,7 +107,7 @@
# For libraries which include headers from other libraries.
INCLUDES = -I. -I.. -I$(topdir)
-CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
+CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS) $(LOCAL_CFLAGS) $(CFLAGS)
.SUFFIXES: .so
diff -ru readline-6.2/support/shobj-conf readline-6.2-patched/support/shobj-conf
--- readline-6.2/support/shobj-conf 2012-06-14 23:02:19.000000000 +0200
+++ readline-6.2-patched/support/shobj-conf 2012-06-18 14:37:26.000000000 +0200
@@ -169,7 +169,7 @@
SHLIB_LIBSUFF='dylib'
SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`'
- SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/`echo $@ | sed "s:\\(.*\\.[0-9]\\)\\.[0-9]:\\1:"` -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
;;
@@ -187,7 +187,7 @@
case "${host_os}" in
darwin[789]*|darwin1[012]*) SHOBJ_LDFLAGS=''
- SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/`echo $@ | sed "s:\\(.*\\.[0-9]\\)\\.[0-9]:\\1:"` -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
;;
*) SHOBJ_LDFLAGS='-dynamic'
SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment