Date: Thu, 10 Jun 2010 01:10:03 GMT From: wahjava@gmail.com (Ashish SHUKLA) To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/146979: editors/emacs configuration ignores "-D WITHOUT_X11" Message-ID: <201006100110.o5A1A3Ud094583@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/146979; it has been noted by GNATS. From: wahjava@gmail.com (Ashish SHUKLA) To: keramida@freebsd.org (Giorgos Keramidas) Cc: Anonymous <swell.k@gmail.com>, Paul Hoffman <phoffman@proper.com>, bug-followup@freebsd.org, TAKANO Yuji <takachan@running-dog.net> Subject: Re: ports/146979: editors/emacs configuration ignores "-D WITHOUT_X11" Date: Thu, 10 Jun 2010 06:32:08 +0530 --=-=-= Hi Giorgos, The attached diff includes: - OPTIONS related changes. - removal of ALSA detection code from configure. - dependencies fix. - Compilation fixes on 6.x/9.x due to DBUS sent by swell.k@gmail.com. - Canna support contributed by Yuji TAKANO. - CONFLICTS with 24.x. Thanks -- Ashish SHUKLA Sent via Gnus from GNU Emacs --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=emacs.diff Content-Description: editors/emacs diff diff -urN /usr/ports/editors/emacs/Makefile emacs/Makefile --- /usr/ports/editors/emacs/Makefile 2010-06-06 01:35:46.000000000 +0530 +++ emacs/Makefile 2010-06-09 06:06:50.000000000 +0530 @@ -7,7 +7,7 @@ PORTNAME= emacs PORTVERSION= ${EMACS_VER} -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 2 CATEGORIES= editors ipv6 MASTER_SITES= ${MASTER_SITE_GNU} @@ -18,9 +18,10 @@ MAKE_JOBS_UNSAFE= yes -CONFLICTS= emacs-19.* emacs-21.* emacs-22.* \ +CONFLICTS= emacs-19.* emacs-21.* emacs-22.* emacs-24.* \ xemacs-[0-9]* xemacs-devel-[0-9]* \ - xemacs-mule-[0-9]* xemacs-devel-mule-[0-9]* + xemacs-mule-[0-9]* xemacs-devel-mule-[0-9]* \ + emacs-nox11-[0-9]* INSTALLS_ICONS= yes @@ -28,8 +29,10 @@ GNU_CONFIGURE= yes USE_GMAKE= yes USE_BZIP2= yes +CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING MAN1= b2m.1 ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \ grep-changelog.1 rcs-checkin.1 @@ -44,30 +47,31 @@ org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve \ smtpmail speedbar tramp url vip viper widget woman -OPTIONS= DBUS "DBus support" ON \ +OPTIONS= CANNA "Canna support" OFF \ + DBUS "DBus support" ON \ GCONF "GConf support" ON \ - GIF "GIF support" ON \ - GTK2 "GTK+ support" ON \ - JPEG "JPEG support" ON \ + GIF "GIF images support" ON \ + JPEG "JPEG images support" ON \ M17N "M17N support for text-shaping" ON \ - MOTIF "Motif support" OFF \ - OTF "Opentype Font" ON \ - PNG "PNG support" ON \ + MOTIF "Use Motif widgets" OFF \ + OTF "Opentype fonts support" ON \ + PNG "PNG images support" ON \ SOUND "Sound support" ON \ SOURCES "Install source code" ON \ - SVG "SVG support" ON \ - TIFF "TIFF support" ON \ - X11 "X11 support" ON \ - XAW "XAW support" OFF \ - XAW3D "XAW3D support" OFF \ + SVG "SVG images support" ON \ + TIFF "TIFF images support" ON \ + XAW "Use Athena widgets" OFF \ + XAW3D "Use Athena3D widgets" OFF \ SYNC_INPUT "Synchronously process asynchronous input" ON \ SCROLLBARS "Without toolkit scroll-bars" ON \ - XFT "Xft support" ON \ - XIM "XIM support" ON \ - XPM "XPM support" ON + XFT "Freetype fonts support" ON \ + XIM "X Input Method support" ON \ + XPM "XPM images support" ON .include <bsd.port.options.mk> +DBUS_PTHREAD_LIBS= ${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:||' -e 's|}.*$$||' || ${TRUE} + .if defined(WITHOUT_X11) CONFIGURE_ARGS+= --without-x .else @@ -160,12 +164,10 @@ .if defined(WITHOUT_M17N) CONFIGURE_ARGS+= --without-m17n-flt -CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib" .else .if !defined(WITHOUT_XFT) LIB_DEPENDS+= m17n.4:${PORTSDIR}/devel/m17n-lib .endif -CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib -lintl" .endif .if defined(WITHOUT_OTF) @@ -186,6 +188,20 @@ CONFIGURE_ARGS+= --without-xim .endif +.if defined(WITH_CANNA) +PATCH_SITES+= ${MASTER_SITE_LOCAL} +PATCH_SITE_SUBDIR+= nork +PATCHFILES+= emacs232canna-20100608.patch.gz +PATCH_DIST_STRIP= -p1 +CONFIGURE_ARGS+= --with-canna \ + --with-canna-includes=${LOCALBASE}/include \ + --with-canna-libraries=${LOCALBASE}/lib +LIB_DEPENDS+= canna.1:${PORTSDIR}/japanese/canna-lib +PLIST_SUB+= CANNA="" +.else +PLIST_SUB+= CANNA="@comment " +.endif + .endif .if defined(WITHOUT_SOUND) @@ -195,18 +211,11 @@ .if defined(WITHOUT_DBUS) CONFIGURE_ARGS+= --without-dbus .else -LIB_DEPENDS+= dbus-1.3:${PORTSDIR}/devel/dbus \ - dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib +LIB_DEPENDS+= dbus-1.3:${PORTSDIR}/devel/dbus .endif -CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" - .include <bsd.port.pre.mk> -.if !defined(WITHOUT_NLS) -USE_GETTEXT= yes -.endif - .if defined(WITHOUT_SOURCES) PLIST_SUB+= SOURCES="@comment " .else @@ -225,6 +234,9 @@ @${RM} -f ${WRKSRC}/info/* @${REINPLACE_CMD} -e "s/%%EMACS_VER%%/${EMACS_VER}/g" -e "s/%%DATADIR%%/${DATADIR:C/\//\\\//g}/g" ${WRKSRC}/sources.el +post-configure: + @${REINPLACE_CMD} -e "s/^\(DBUS_LIBS.*\)-pthread\(.*\)$$/\1$$(${DBUS_PTHREAD_LIBS})\2/" ${WRKSRC}/src/Makefile + .if defined(WITH_SOURCES) post-install: @${MKDIR} ${DATADIR}/${EMACS_VER}/src @@ -232,4 +244,16 @@ @${INSTALL_DATA} ${WRKSRC}/sources.el ${DATADIR}/${EMACS_VER}/site-lisp/site-start.el .endif +pre-everything:: + @${ECHO_MSG} +.if !defined(WITHOUT_X11) + @${ECHO_MSG} "====> To disable X11 support, define: WITHOUT_X11." +.endif +.if defined(WITH_CANNA) + @${ECHO_MSG} "====> Canna support is not part of standard distribution" + @${ECHO_MSG} "====> of GNU Emacs and is therefore not supported by GNU" + @${ECHO_MSG} "====> Emacs development team." +.endif + @${ECHO_MSG} + .include <bsd.port.post.mk> diff -urN /usr/ports/editors/emacs/distinfo emacs/distinfo --- /usr/ports/editors/emacs/distinfo 2010-05-14 13:34:38.000000000 +0530 +++ emacs/distinfo 2010-06-09 04:39:36.000000000 +0530 @@ -1,3 +1,6 @@ MD5 (emacs-23.2.tar.bz2) = 057a0379f2f6b85fb114d8c723c79ce2 SHA256 (emacs-23.2.tar.bz2) = ffd466fa5b06c0451612210190d2feb14b2d7ca9dd41893357d2201dd28526c5 SIZE (emacs-23.2.tar.bz2) = 38376047 +MD5 (emacs232canna-20100608.patch.gz) = d7cc4f928470ef1d28f5e9266846c025 +SHA256 (emacs232canna-20100608.patch.gz) = 99d258a1924e9e2500e6ffd073d288f48260f86f24113abf91234cef711f455a +SIZE (emacs232canna-20100608.patch.gz) = 33903 diff -urN /usr/ports/editors/emacs/files/patch-configure emacs/files/patch-configure --- /usr/ports/editors/emacs/files/patch-configure 1970-01-01 05:30:00.000000000 +0530 +++ emacs/files/patch-configure 2010-06-06 06:44:49.000000000 +0530 @@ -0,0 +1,220 @@ + +$FreeBSD$ + +--- configure.orig ++++ configure +@@ -6433,214 +6433,8 @@ + + + +- ALSA_REQUIRED=1.0.0 +- ALSA_MODULES="alsa >= $ALSA_REQUIRED" +- +- succeeded=no +- +- # Extract the first word of "pkg-config", so it can be a program name with args. +-set dummy pkg-config; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- case $PKG_CONFIG in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +-done +-IFS=$as_save_IFS +- +- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" +- ;; +-esac +-fi +-PKG_CONFIG=$ac_cv_path_PKG_CONFIG +-if test -n "$PKG_CONFIG"; then +- { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +-$as_echo "$PKG_CONFIG" >&6; } +-else +- { $as_echo "$as_me:$LINENO: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +- +- if test "$PKG_CONFIG" = "no" ; then +- HAVE_ALSA=no +- else +- PKG_CONFIG_MIN_VERSION=0.9.0 +- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then +- { $as_echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5 +-$as_echo_n "checking for $ALSA_MODULES... " >&6; } +- +- if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then +- { $as_echo "$as_me:$LINENO: result: yes" >&5 +-$as_echo "yes" >&6; } +- succeeded=yes +- +- { $as_echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5 +-$as_echo_n "checking ALSA_CFLAGS... " >&6; } +- ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'` +- { $as_echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5 +-$as_echo "$ALSA_CFLAGS" >&6; } +- +- { $as_echo "$as_me:$LINENO: checking ALSA_LIBS" >&5 +-$as_echo_n "checking ALSA_LIBS... " >&6; } +- ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'` +- { $as_echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5 +-$as_echo "$ALSA_LIBS" >&6; } +- else +- { $as_echo "$as_me:$LINENO: result: no" >&5 +-$as_echo "no" >&6; } +- ALSA_CFLAGS="" +- ALSA_LIBS="" +- ## If we have a custom action on failure, don't print errors, but +- ## do set a variable so people can do so. +- ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"` +- +- fi +- +- +- +- else +- echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." +- echo "*** See http://www.freedesktop.org/software/pkgconfig" +- fi +- fi +- +- if test $succeeded = yes; then +- HAVE_ALSA=yes +- else +- HAVE_ALSA=no +- fi +- +- if test $HAVE_ALSA = yes; then +- SAVE_CFLAGS="$CFLAGS" +- SAVE_LDFLAGS="$LDFLAGS" +- CFLAGS="$ALSA_CFLAGS $CFLAGS" +- LDFLAGS="$ALSA_LIBS $LDFLAGS" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <asoundlib.h> +-int +-main () +-{ +-snd_lib_error_set_handler (0); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- emacs_alsa_normal=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- emacs_alsa_normal=no + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- if test "$emacs_alsa_normal" != yes; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <alsa/asoundlib.h> +-int +-main () +-{ +-snd_lib_error_set_handler (0); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- emacs_alsa_subdir=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- emacs_alsa_subdir=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- if test "$emacs_alsa_subdir" != yes; then +- { { $as_echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5 +-$as_echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;} +- { (exit 1); exit 1; }; } +- fi +- ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" +- fi +- +- CFLAGS="$SAVE_CFLAGS" +- LDFLAGS="$SAVE_LDFLAGS" +- LIBSOUND="$LIBSOUND $ALSA_LIBS" +- CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ALSA 1 +-_ACEOF +- +- fi +- +-fi +- +- + + + diff -urN /usr/ports/editors/emacs/pkg-descr emacs/pkg-descr --- /usr/ports/editors/emacs/pkg-descr 2000-02-13 23:00:05.000000000 +0530 +++ emacs/pkg-descr 2010-06-09 05:46:44.000000000 +0530 @@ -12,4 +12,6 @@ read-eval-print loop (Lisp-Interaction-Mode), automated psychotherapy (Doctor :-) and many more. +Canna support is contributed by Yuji TAKANO (takachan@running-dog.net). + WWW: http://www.gnu.org/software/emacs/ diff -urN /usr/ports/editors/emacs/pkg-plist emacs/pkg-plist --- /usr/ports/editors/emacs/pkg-plist 2010-05-14 13:34:38.000000000 +0530 +++ emacs/pkg-plist 2010-06-09 05:32:13.000000000 +0530 @@ -27,6 +27,7 @@ %%DATADIR%%/%%EMACS_VER%%/etc/DEVEL.HUMOR %%DATADIR%%/%%EMACS_VER%%/etc/DISTRIB %%DATADIR%%/%%EMACS_VER%%/etc/DOC-%%EMACS_VER%%.1 +%%CANNA%%%%DATADIR%%/%%EMACS_VER%%/etc/DOC-%%EMACS_VER%%.2 %%DATADIR%%/%%EMACS_VER%%/etc/ERC-NEWS %%DATADIR%%/%%EMACS_VER%%/etc/ETAGS.EBNF %%DATADIR%%/%%EMACS_VER%%/etc/ETAGS.README @@ -1137,6 +1138,8 @@ %%DATADIR%%/%%EMACS_VER%%/lisp/calendar/timeclock.elc %%DATADIR%%/%%EMACS_VER%%/lisp/calendar/todo-mode.el.gz %%DATADIR%%/%%EMACS_VER%%/lisp/calendar/todo-mode.elc +%%CANNA%%%%DATADIR%%/%%EMACS_VER%%/lisp/canna.el.gz +%%CANNA%%%%DATADIR%%/%%EMACS_VER%%/lisp/canna.elc %%DATADIR%%/%%EMACS_VER%%/lisp/case-table.el.gz %%DATADIR%%/%%EMACS_VER%%/lisp/case-table.elc %%DATADIR%%/%%EMACS_VER%%/lisp/cdl.el.gz @@ -2323,6 +2326,8 @@ %%DATADIR%%/%%EMACS_VER%%/lisp/international/utf-7.elc %%DATADIR%%/%%EMACS_VER%%/lisp/isearch.el.gz %%DATADIR%%/%%EMACS_VER%%/lisp/isearch.elc +%%CANNA%%%%DATADIR%%/%%EMACS_VER%%/lisp/isearch-ext.elc +%%CANNA%%%%DATADIR%%/%%EMACS_VER%%/lisp/isearch-ext.el.gz %%DATADIR%%/%%EMACS_VER%%/lisp/isearchb.el.gz %%DATADIR%%/%%EMACS_VER%%/lisp/isearchb.elc %%DATADIR%%/%%EMACS_VER%%/lisp/iswitchb.el.gz @@ -3541,6 +3546,7 @@ %%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/bytecode.c %%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/callint.c %%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/callproc.c +%%CANNA%%%%DATADIR%%/%%EMACS_VER%%/src/canna.c %%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/casefiddle.c %%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/casetab.c %%SOURCES%%%%DATADIR%%/%%EMACS_VER%%/src/category.c --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006100110.o5A1A3Ud094583>