Pass LDFLAGS for configure and build

This commit is contained in:
adam 2011-01-31 10:36:21 +00:00
parent 381781d6d5
commit 70e13353c1
4 changed files with 39 additions and 84 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.15 2009/07/07 22:01:50 joerg Exp $
# $NetBSD: Makefile,v 1.16 2011/01/31 10:36:21 adam Exp $
DISTNAME= html2text-1.3.2a
CATEGORIES= textproc
@ -8,16 +8,25 @@ MASTER_SITES= http://www.mbayer.de/html2text/downloads/ \
MAINTAINER= rh@NetBSD.org
HOMEPAGE= http://www.mbayer.de/html2text/
COMMENT= Advanced HTML-to-text converter
LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
USE_LANGUAGES= c c++
USE_TOOLS+= gunzip
GCC_REQD+= 3.0
HAS_CONFIGURE= yes
CONFIGURE_ENV+= ECHO=${ECHO:Q}
USE_TOOLS+= gunzip
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
SUBST_CLASSES+= configure
SUBST_STAGE.configure= pre-configure
SUBST_MESSAGE.configure=Fixing 'configure' script
SUBST_FILES.configure= configure
SUBST_SED.configure= -e 's,^$$echo,$$echo -n,'
SUBST_SED.configure+= -e 's,\\c,,'
SUBST_SED.configure+= -e 's,$$CXX $$tmp_file.C,$$CXX $$LDFLAGS $$tmp_file.C,'
post-build:
${GUNZIP_CMD} -d ${WRKSRC}/html2text.1.gz ${WRKSRC}/html2textrc.5.gz

View file

@ -1,7 +1,7 @@
$NetBSD: distinfo,v 1.7 2005/03/24 08:53:29 adam Exp $
$NetBSD: distinfo,v 1.8 2011/01/31 10:36:21 adam Exp $
SHA1 (html2text-1.3.2a.tar.gz) = 91d46e3218d05b0783bebee96a14f0df0eb9773e
RMD160 (html2text-1.3.2a.tar.gz) = 2771c52ea3ff6c97a13d6171839e61bb19226311
Size (html2text-1.3.2a.tar.gz) = 130088 bytes
SHA1 (patch-aa) = dc72dfb31997df0fd0c33aadcb9af6a5df39000f
SHA1 (patch-ab) = 4282aa51557fcd4e8a322dfe4f1849d5100d6cdc
SHA1 (patch-aa) = a87a5861487081ee702455de3aab998f95eb8a1d
SHA1 (patch-ab) = 74e948bd8e63d4d3de320f51e339b18198f2f6ba

View file

@ -1,4 +1,4 @@
$NetBSD: patch-aa,v 1.3 2005/03/24 08:53:29 adam Exp $
$NetBSD: patch-aa,v 1.4 2011/01/31 10:36:21 adam Exp $
--- configure.orig 2004-01-12 15:47:18.000000000 +0000
+++ configure
@ -11,84 +11,27 @@ $NetBSD: patch-aa,v 1.3 2005/03/24 08:53:29 adam Exp $
rm -rf configure-tmp || exit 1;
mkdir configure-tmp || exit 1;
@@ -30,7 +30,7 @@ makedirs=".";
# $CXX
#
-$echo 'Checking C++ compiler... \c';
+$echo -n 'Checking C++ compiler... ';
cat <<EOF >$tmp_file.C;
#include <iostream>
int main(int, char **) {
@@ -55,7 +55,7 @@ $echo "use \"$CXX\"";
# $SYS_POLL_MISSING
#
-$echo 'Checking <sys/poll.h>... \c';
+$echo -n 'Checking <sys/poll.h>... ';
SYS_POLL_MISSING=unknown;
cat <<EOF >$tmp_file.C;
#ifdef SYS_POLL_MISSING /* { */
@@ -95,7 +95,7 @@ esac;
# $SOCKET_LIBRARIES
#
-$echo 'Checking for socket libraries... \c';
+$echo -n 'Checking for socket libraries... ';
SOCKET_LIBRARIES=unknown;
cat >$tmp_file.C <<EOF;
extern "C" int socket();
@@ -126,7 +126,7 @@ fi;
# $BOOL_DEFINITION
#
-$echo 'Checking "bool"... \c';
+$echo -n 'Checking "bool"... ';
BOOL_DEFINITION=unknown;
cat <<EOF >$tmp_file.C;
#ifdef BOOL_DEFINITION
@@ -163,7 +163,7 @@ esac;
# $EXPLICIT
#
-$echo 'Checking "explicit"... \c';
+$echo -n 'Checking "explicit"... ';
EXPLICIT=unknown;
cat <<EOF >$tmp_file.C;
struct C {
@@ -194,7 +194,7 @@ esac;
# $LIBSTDCXX_INCLUDES, $LIBSTDCXX_LIBS
#
-$echo 'Checking Standard C++ library... \c';
+$echo -n 'Checking Standard C++ library... ';
cat <<EOF >$tmp_file.C;
#include <string>
#include <list>
@@ -222,7 +222,7 @@ fi;
# $AUTO_PTR_BROKEN
#
AUTO_PTR_BROKEN="";
-$echo 'Checking "auto_ptr"... \c';
+$echo -n 'Checking "auto_ptr"... ';
cat <<EOF >$tmp_file.C;
#include <memory>
#include <string>
@@ -254,7 +254,7 @@ fi;
# $MAKEDEPEND_INCLUDES
#
MAKEDEPEND_INCLUDES="";
-$echo 'Checking "makedepend" includes... \c';
+$echo -n 'Checking "makedepend" includes... \c';
echo "#include <iostream>" >$tmp_file.C;
MAKEDEPEND_INCLUDES=`$CXX -E $tmp_file.C 2>/dev/null |
sed -n \
@@ -287,7 +287,7 @@ for i in \
@@ -38,13 +38,7 @@ int main(int, char **) {
return 0;
}
EOF
-CXX=unknown;
-for i in "CC" "g++" "cc" "$CC"; do
- if $i -c $tmp_file.C 2>/dev/null; then
- CXX="$i";
- break;
- fi;
-done;
+CXX="${CXX}";
if test "$CXX" = unknown; then
$echo "Error: Could not find a working C++ compiler.";
exit 1;
@@ -287,7 +281,7 @@ for i in \
MAKEDEPEND_INCLUDES; \
do cmd="$cmd -e \"s|@$i@|\$$i|g\""; done;
for dir in $makedirs; do
- $echo "Creating \"$dir/Makefile\" from \"$dir/Makefile.in\"... \\c";
+ $echo -n "Creating \"$dir/Makefile\" from \"$dir/Makefile.in\"... ";
+ $echo "Creating \"$dir/Makefile\" from \"$dir/Makefile.in\"... ";
cat <<EOF >$dir/Makefile;
#

View file

@ -1,13 +1,16 @@
$NetBSD: patch-ab,v 1.2 2005/03/24 08:53:29 adam Exp $
$NetBSD: patch-ab,v 1.3 2011/01/31 10:36:21 adam Exp $
--- Makefile.in.orig 2004-01-14 13:47:02.000000000 +0000
+++ Makefile.in
@@ -48,7 +48,7 @@ DEBUG=-O2 -g
@@ -47,9 +47,8 @@ DEBUG=-O2 -g
INCLUDES = $(LIBSTDCXX_INCLUDES)
DEFINES = -DVERSION=$(VERSION) $(SYS_POLL_MISSING) $(BOOL_DEFINITION) $(EXPLICIT) $(AUTO_PTR_BROKEN)
CPPFLAGS = $(INCLUDES) $(DEFINES)
-CPPFLAGS = $(INCLUDES) $(DEFINES)
-CXXFLAGS = $(CPPFLAGS) $(DEBUG)
-LDFLAGS = $(DEBUG)
+CPPFLAGS += $(INCLUDES) $(DEFINES)
+CXXFLAGS += $(CPPFLAGS)
LDFLAGS = $(DEBUG)
LOADLIBES = $(LIBSTDCXX_LIBS) $(SOCKET_LIBRARIES)
.SUFFIXES : .C .o