Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 207367 Details for
Bug 289401
Convert eselect-python to use automake
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
convert to automake
use-automake.patch (text/plain), 3.97 KB, created by
Jonathan Callen (RETIRED)
on 2009-10-16 22:09:25 UTC
(
hide
)
Description:
convert to automake
Filename:
MIME Type:
Creator:
Jonathan Callen (RETIRED)
Created:
2009-10-16 22:09:25 UTC
Size:
3.97 KB
patch
obsolete
>Before applying, run: > svn mv python.eselect python.eselect.in > svn rm Makefile.in > >After applying, run > svn add Makefile.am > >Index: python-wrapper.c >=================================================================== >--- python-wrapper.c (revision 233) >+++ python-wrapper.c (working copy) >@@ -11,8 +11,6 @@ > > #include "config.h" > >-#define ENVD_CONFIG "/etc/env.d/python/config" >- > /* 127 is the standard return code for "command not found" */ > #define EXIT_ERROR 127 > >@@ -46,10 +44,12 @@ > const char* PATH = getenv("PATH"); > if (! PATH) > { >- /* If PATH is unset, then it defaults to ":/bin:/usr/bin", per >- * execvp(3). >+ /* If PATH is unset, then it would normally default to >+ * ":/bin:/usr/bin", per execvp(3), but we want to search the most >+ * likely location first (PREFIX/bin), so prepend that to the search >+ * string. > */ >- PATH = ":/bin:/usr/bin"; >+ PATH = BINDIR "::/bin:/usr/bin"; > } > char* path = strdup(PATH); > char* state = NULL; >@@ -147,7 +147,7 @@ > const char* path = find_path(exe); > if (! path || ! *path) > { >- path = "/usr/bin"; >+ path = BINDIR; > } > struct dirent** namelist; > int n = scandir(path, &namelist, filter_python, sort_python); >Index: configure.ac >=================================================================== >--- configure.ac (revision 233) >+++ configure.ac (working copy) >@@ -1,14 +1,20 @@ > AC_INIT([eselect-python], [20090824]) > >+AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2]) >+AC_CANONICAL_BUILD >+AC_CANONICAL_HOST >+ > CFLAGS="${CFLAGS--march=native -O3 -pipe -fno-ident}" > LDFLAGS="${LDFLAGS--Wl,-O1,--as-needed,--gc-sections,--hash-style=gnu}" > > AC_PROG_CC >-AC_PATH_PROG(INSTALL, install) >-MKDIR="${MKDIR:-${INSTALL} -d}" > > AC_USE_SYSTEM_EXTENSIONS > >+dnl We can't use ${bindir} here, as it, by default, expands to '${exec_prefix}/bin' >+AC_DEFINE_UNQUOTED([BINDIR], ["${prefix}/bin"], [Path to /usr/bin equivalent]) >+AC_DEFINE_UNQUOTED([ENVD_CONFIG], ["${sysconfdir}/env.d/python/config"], [Path to python config]) >+ > # strndup() was introduced in POSIX.1-2008. > AC_MSG_CHECKING([for strndup]) > old_CFLAGS="${CFLAGS}" >@@ -28,11 +34,10 @@ > fi > CFLAGS="${old_CFLAGS}" > >-AC_SUBST([ASFLAGS]) > AC_SUBST([MKDIR]) > > # Create output files. > AC_CONFIG_HEADERS([config.h]) >-AC_CONFIG_FILES([Makefile]) >+AC_CONFIG_FILES([Makefile python.eselect]) > > AC_OUTPUT >Index: Makefile.am >=================================================================== >--- Makefile.am (revision 0) >+++ Makefile.am (revision 0) >@@ -0,0 +1,25 @@ >+AM_CFLAGS = -Wall -Wextra >+ >+bin_PROGRAMS = python-wrapper >+ >+python_wrapper_SOURCES = config.h python-wrapper.c >+ >+modulesdir = $(datadir)/eselect/modules >+nodist_modules_DATA = python.eselect >+EXTRA_DATA = python.eselect.in >+ >+REALLY_CLEAN_FILES = \ >+ aclocal.m4 \ >+ config.guess \ >+ config.h.in \ >+ config.h.in~ \ >+ config.sub \ >+ configure \ >+ depcomp \ >+ install-sh \ >+ Makefile.in \ >+ missing >+ >+.PHONY: really-clean >+really-clean: maintainer-clean >+ -rm -f $(REALLY_CLEAN_FILES) >Index: python.eselect.in >=================================================================== >--- python.eselect.in (revision 233) >+++ python.eselect.in (working copy) >@@ -7,10 +7,15 @@ > SVN_DATE='$Date$' > VERSION=$(svn_date_to_version "${SVN_DATE}" ) > >-ENV_D_PATH="${ROOT%/}/etc/env.d" >-INTERPRETER_PATH="${ROOT%/}/usr/bin/" >-MAN_PATH="${ROOT%/}/usr/share/man/man1/" >+prefix=@prefix@ >+exec_prefix=@exec_prefix@ >+datarootdir=@datarootdir@ >+datadir=@datadir@ > >+ENV_D_PATH="${ROOT%/}@sysconfdir@/env.d" >+INTERPRETER_PATH="${ROOT%/}@bindir@/" >+MAN_PATH="${ROOT%/}@mandir@/man1/" >+ > # Find a list of python versions > find_targets() { > local interpreter >Index: autogen.sh >=================================================================== >--- autogen.sh (revision 233) >+++ autogen.sh (working copy) >@@ -1,7 +1,9 @@ > #!/bin/sh > >+"${ACLOCAL:-aclocal}" || exit 1 >+"${AUTOCONF:-autoconf}" || exit 1 > "${AUTOHEADER:-autoheader}" || exit 1 >-"${AUTOCONF:-autoconf}" || exit 1 >+"${AUTOMAKE:-automake}" --add-missing --copy --foreign || exit 1 > > # Remove Autoconf cache. > rm -fr autom4te.cache
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 289401
: 207367