From e032c3f13132bffbdc3b6c44b323f9bbc69311c3 Mon Sep 17 00:00:00 2001 From: ade Date: Mon, 10 Sep 2007 09:11:46 +0000 Subject: Remove dependency on gnu-auto* and use the new autotools world order. Approved by: kde folks --- devel/kdevelop/Makefile | 10 +- devel/kdevelop/files/kdevelop | 2 - .../kdevelop/files/patch-admin-detect-autoconf.pl | 143 +++++++++++++++++++++ 3 files changed, 146 insertions(+), 9 deletions(-) create mode 100644 devel/kdevelop/files/patch-admin-detect-autoconf.pl (limited to 'devel/kdevelop') diff --git a/devel/kdevelop/Makefile b/devel/kdevelop/Makefile index 7ef0e2cdfeaa..04f0aee8f2d5 100644 --- a/devel/kdevelop/Makefile +++ b/devel/kdevelop/Makefile @@ -7,7 +7,7 @@ PORTNAME= kdevelop PORTVERSION= 3.4.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES?= devel kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${KDE_VERSION}/src @@ -23,9 +23,7 @@ BUILD_DEPENDS= cervisia:${PORTSDIR}/devel/kdesdk3 \ LIB_DEPENDS= svn_client-1.0:${PORTSDIR}/devel/subversion RUN_DEPENDS= extractrc:${PORTSDIR}/devel/kdesdk3 \ gdb66:${PORTSDIR}/devel/gdb6 \ - gmake:${PORTSDIR}/devel/gmake \ - ${LOCALBASE}/gnu-autotools/bin/automake:${PORTSDIR}/devel/gnu-automake \ - ${LOCALBASE}/gnu-autotools/bin/autoconf:${PORTSDIR}/devel/gnu-autoconf + gmake:${PORTSDIR}/devel/gmake .if defined(WITH_OPTIONAL_DEPENDS) RUN_DEPENDS+= ark:${PORTSDIR}/misc/kdeutils3 \ @@ -42,7 +40,7 @@ USE_KDELIBS_VER=3 USE_BZIP2= yes USE_GMAKE= yes USE_BDB= yes -USE_AUTOTOOLS= libtool:15 +USE_AUTOTOOLS= libtool:15 autotools:run _NO_KDE_FINAL= yes CONFIGURE_ARGS+=--with-qtdoc-dir=${X11BASE}/share/doc/qt/html \ --with-db-includedir=${BDB_INCLUDE_DIR} \ @@ -53,8 +51,6 @@ CONFIGURE_ARGS+=--with-qtdoc-dir=${X11BASE}/share/doc/qt/html \ --with-svn-lib=${LOCALBASE}/lib \ --with-neon-config=${LOCALBASE}/bin/neon-config -CONFIGURE_ENV+= PATH=${LOCALBASE}/gnu-autotools/bin:${PATH} - .include "${.CURDIR}/../../x11/kde3/Makefile.kde" .include diff --git a/devel/kdevelop/files/kdevelop b/devel/kdevelop/files/kdevelop index a02437512df2..0d76143d2fe5 100644 --- a/devel/kdevelop/files/kdevelop +++ b/devel/kdevelop/files/kdevelop @@ -1,7 +1,5 @@ #!/bin/sh -export PATH=%%LOCALBASE%%/gnu-autotools/bin:${PATH} -export ACLOCAL_FLAGS="-I %%LOCALBASE%%/share/aclocal ${ACLOCAL_FLAGS}" export PTHREAD_LIBS=%%PTHREAD_LIBS%% exec "%%PREFIX%%/bin/kdevelop-bin" "$@" diff --git a/devel/kdevelop/files/patch-admin-detect-autoconf.pl b/devel/kdevelop/files/patch-admin-detect-autoconf.pl new file mode 100644 index 000000000000..ca4350a76799 --- /dev/null +++ b/devel/kdevelop/files/patch-admin-detect-autoconf.pl @@ -0,0 +1,143 @@ +--- admin/detect-autoconf.pl.orig 2007-05-14 03:57:35.000000000 -0700 ++++ admin/detect-autoconf.pl 2007-09-10 02:02:32.000000000 -0700 +@@ -5,2 +5,5 @@ + # ++# Stripped down for new FreeBSD autotools environment ++# Ade Lovett 2007-09-10 ++# + # Copyright (c) 2005. +@@ -23,69 +26,2 @@ + +-# Subroutine to determine the highest installed version of the given program, +-# searching from the given paths. +-sub findBest +-{ +- my ($program, @paths) = @_; +- my $best_version_found = '0'; # Deliberately a string. +- my %versions; +- my %minimumVersions = ( +- 'autoconf' => '2.5', +- 'automake' => '1.6', +- ); +- +- # Allow user to use environment variable to override search. +- return $ENV{uc $program} if $ENV{uc $program}; +- +- for $prefix (@paths) +- { +- @files = glob "$prefix/$program*"; +- for $file (@files) +- { +- # Don't check non-executable scripts. +- next unless -x $file; +- +- ($version) = $file =~ /$prefix\/$program-?(.*)$/; +- $version =~ s/-|\.//g; +- +- # Special case some programs to make sure it has a minimum version. +- if (not $version and exists $minimumVersions{$program}) +- { +- my $min_version = $minimumVersions{$program}; +- my $versionOutput = `$program --version 2>/dev/null | head -n 1`; +- +- # If we can't run the script to get the version it likely won't work later. +- next unless $versionOutput; +- +- # Use number.number for version (we don't need the excess in general). +- ($versionOutput) = ($versionOutput =~ /(\d\.\d)/); +- +- # Use lt to do lexicographical comparison of strings (which should be +- # equivalent and doesn't involve issues with floating point conversions). +- if (not $versionOutput or $versionOutput lt $min_version) +- { +- next; +- } +- } +- +- # If no version suffix then use it in favor of a versioned autotool +- # since the ever-popular WANT_AUTOFOO should then work (in theory). +- return $file unless $version; +- +- # Emulate 'which', and abort if we've already seen this version. +- next if exists $versions{$version}; +- +- # Save filename of program. +- $versions{$version} = $file; +- +- # Use string comparison so that e.g. 253a will be > 253 but < 254. +- if ($version gt $best_version_found) +- { +- $best_version_found = $version; +- } +- } +- } +- +- return $versions{$best_version_found}; +-} +- + # Find an appropriate "which" program for later use by the shell script calling +@@ -103,13 +39,2 @@ + +-# Uses which() to find a program unless the user provided its path in the +-# environment (the upper case program name is searched). +-sub findProgram +-{ +- $suffix = ""; # For use if @_ has only one param. +- my ($program, $suffix) = @_; +- +- return $ENV{uc $program} if $ENV{uc $program}; +- return which("$program$suffix"); +-} +- + # SCRIPT STARTS. +@@ -123,45 +48,12 @@ + +-$autoconf = findBest('autoconf', @paths); +-($autoconf_suffix) = $autoconf =~ /.*autoconf(.*)$/; +- +-# Find matching autoconf companions. +-$autoheader = findProgram('autoheader', $autoconf_suffix); +-$autom4te = findProgram('autom4te', $autoconf_suffix); +- +-# Get best automake, and look for unsermake to possibly override it. +-$automake = findBest('automake', @paths); +-$unsermake = ""; +-# backward compatible: if $UNSERMAKE points to a path, use it +-$unsermake = findProgram('unsermake') if (defined($ENV{'UNSERMAKE'}) and $ENV{'UNSERMAKE'} =~ /\//); +-# new compatible: if it says 'yes', use the one from path +-$unsermake = which('unsermake') if ($ENV{'UNSERMAKE'} ne 'no'); +- +-($automake_suffix) = $automake =~ /.*automake(.*)$/; +- +-# Use unsermake if we found it. +-$automake = "$unsermake -c" if $unsermake; +- +-# Find matching automake companions. +-$aclocal = findProgram('aclocal', $automake_suffix); +- + $which = findWhich(); + +-# Make sure we have all of the needed programs. +-for $i (qw'autoconf autoheader autom4te automake aclocal') +-{ +- unless(${$i}) +- { +- print "# Unable to find $i!!\n"; +- exit 1; +- } +-} +- + # Print results in eval-able form. + print <