Bug 147546 - Update Port: editors/emacs-devel to a snapshot of 24.x
Summary: Update Port: editors/emacs-devel to a snapshot of 24.x
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ashish SHUKLA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-06 03:50 UTC by Ashish Shukla
Modified: 2010-07-28 13:31 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (59.62 KB, patch)
2010-06-06 03:50 UTC, Ashish Shukla
no flags Details | Diff
bsd.emacs.mk.diff (558 bytes, patch)
2010-06-06 04:00 UTC, Ashish Shukla
no flags Details | Diff
emacs-devel.diff (59.66 KB, patch)
2010-06-06 23:48 UTC, Ashish Shukla
no flags Details | Diff
emacs-devel.diff (72.87 KB, patch)
2010-06-19 18:44 UTC, Ashish SHUKLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ashish Shukla 2010-06-06 03:50:04 UTC
Updated to a snapshot of Emacs git HEAD. Can some committer please
move the snapshot tarball to FreeBSD FTP server and modify the port
Makefile accordingly.

Changes:
- Added OPTIONS.
- Added LICENSE information.
- Cleanup of dependencies.

Acknowledgements:
- Anonymous for the compilation fix on 6.x and 9.x when DBUS is enabled.
Comment 1 Ashish Shukla 2010-06-06 04:00:27 UTC
Sorry forgot to attach the bsd.emacs.mk diff.

-- 
Ashish SHUKLA

Sent via Gnus from GNU Emacs
Comment 2 swell.k 2010-06-06 11:10:14 UTC
Ashish SHUKLA <wahjava@gmail.com> writes:

> Acknowledgements:
> - Anonymous for the compilation fix on 6.x and 9.x when DBUS is enabled.
[...]
> +DBUS_PTHREAD_LIBS=	${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:||' -e 's|}.*$$||' || ${TRUE}
> +
[...]
> +post-configure:
> +	@${REINPLACE_CMD} -e "s/^\(DBUS_LIBS.*\)-pthread\(.*\)$$/\1$$(${DBUS_PTHREAD_LIBS})\2/" ${WRKSRC}/src/Makefile
> +

Remove my credit. Your version is complex, uses backreferences (slow)
and assumes `$$/' is not interpreted by sh(1) as variable. Besides, it's
now harder to check value

  $ make -V DBUS_PTHREAD_LIBS
Comment 3 Ashish Shukla 2010-06-06 11:16:40 UTC
Anonymous  writes:
> Ashish SHUKLA <wahjava@gmail.com> writes:


>> Acknowledgements:
>> - Anonymous for the compilation fix on 6.x and 9.x when DBUS is enabled.


/Anonymous/d

> [...]
>> +DBUS_PTHREAD_LIBS=	${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:||' -e 's|}.*$$||' || ${TRUE}
>> +
> [...]
>> +post-configure:
>> +	@${REINPLACE_CMD} -e "s/^\(DBUS_LIBS.*\)-pthread\(.*\)$$/\1$$(${DBUS_PTHREAD_LIBS})\2/" ${WRKSRC}/src/Makefile
>> +


> Remove my credit. Your version is complex, uses backreferences (slow)
> and assumes `$$/' is not interpreted by sh(1) as variable. Besides, it's
> now harder to check value


>   $ make -V DBUS_PTHREAD_LIBS


Yes, and also it makes it now harder to invoke a cc/grep/sed/sh during INDEX
generation.

-- 
Ashish SHUKLA

Sent via Gnus from GNU Emacs
Comment 4 swell.k 2010-06-06 11:22:39 UTC
Prevent pre-everything banner from appearing when WITHOUT_X11 is defined.

--- a.diff begins here ---
diff --git a/editors/emacs-devel/Makefile b/editors/emacs-devel/Makefile
index 7d7965a..718c1be 100644
--- a/editors/emacs-devel/Makefile
+++ b/editors/emacs-devel/Makefile
@@ -229,9 +229,11 @@ post-install:
 	@${INSTALL_DATA} ${WRKSRC}/sources.el ${DATADIR}/${EMACS_VER}/site-lisp/site-start.el
 .endif
 
+.if !defined(WITHOUT_X11)
 pre-everything::
 	@${ECHO_MSG}
 	@${ECHO_MSG} "====> To disable X11 support, define: WITHOUT_X11."
 	@${ECHO_MSG}
+.endif
 
 .include <bsd.port.post.mk>
--- a.diff ends here ---
Comment 5 swell.k 2010-06-06 11:42:25 UTC
wahjava@gmail.com (Ashish SHUKLA) writes:

> Anonymous  writes:
>> Ashish SHUKLA <wahjava@gmail.com> writes:
>
>>> Acknowledgements:
>>> - Anonymous for the compilation fix on 6.x and 9.x when DBUS is enabled.
>
> /Anonymous/d
>
>> [...]
>>> +DBUS_PTHREAD_LIBS=	${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 's|^.*%{\!pg: %{pthread:||' -e 's|}.*$$||' || ${TRUE}
>>> +
>> [...]
>>> +post-configure:
>>> +	@${REINPLACE_CMD} -e "s/^\(DBUS_LIBS.*\)-pthread\(.*\)$$/\1$$(${DBUS_PTHREAD_LIBS})\2/" ${WRKSRC}/src/Makefile
>>> +
>
>> Remove my credit. Your version is complex, uses backreferences (slow)
>> and assumes `$$/' is not interpreted by sh(1) as variable. Besides, it's
>> now harder to check value
>
>>   $ make -V DBUS_PTHREAD_LIBS
>
> Yes, and also it makes it now harder to invoke a cc/grep/sed/sh during INDEX
> generation.

DBUS_PTHREAD_LIBS is defined after bsd.port.options.mk. At that point
SED/GREP/TRUE are already defined. And `make describe' as well as `make index'
don't produce errors. The only issue here is performance of `make describe'.
And tools like portupgrade use fetchindex target because it's faster.
So, I'm against sacrificing simplicity for a target that's rarely used.
Comment 6 Giorgos Keramidas freebsd_committer freebsd_triage 2010-06-06 11:46:04 UTC
On Sun, 06 Jun 2010 15:46:40 +0530, wahjava@gmail.com (Ashish SHUKLA) wrote:
> Anonymous  writes:
>> Ashish SHUKLA <wahjava@gmail.com> writes:
>
>>> Acknowledgements:
>>> - Anonymous for the compilation fix on 6.x and 9.x when DBUS is enabled.
>
> /Anonymous/d

'Anonymous' is hard to understand as a credit/ackowledgement here.  We
generally *want* to attribute everything to its original source.  But
having no name at all makes this harder.

Even just the email address would be more useful as a reference to the
original patch author:

    - swell.k@gmail.com has sent compilation fixes for 6.x and 9.x when
      DBUS is enabled.
Comment 7 Ashish Shukla 2010-06-06 23:48:54 UTC
Refer to the attached diff which is final AFAICS.

Thanks to Anonymous (swell.k@)for the compilation fixes for 6.x and 9.x when DBUS is
enabled.

-- 
Ashish SHUKLA

Sent via Gnus from GNU Emacs
Comment 8 swell.k 2010-06-13 12:55:13 UTC
Please, don't abuse PORTREVISION. It's not meant to be a part of DISTNAME.

  PORTREVISION is commonly used to indicate that an update has happened
  that affects the *port framework itself*, but not the distributed
  software (e.g., local patches or Makefile changes).

And it'd be better if you used Bazaar revision number for EMACS_REV
along with *commit date*, not the date you checked out, e.g.

  EMACS_REV = bzr100530.20100604

I had to guess last commit based on lisp/ChangeLog so I could check that
the sources were pristine.

  $ bzr log --timezone=utc --short -r100530 http://bzr.savannah.gnu.org/r/emacs/trunk/

%%
@@ -6,13 +6,11 @@
 #
 
 PORTNAME=	emacs
-PORTVERSION=	${EMACS_VER}
-PORTREVISION=	${EMACS_REV}
+PORTVERSION=	${EMACS_VER}.${EMACS_REV:C/^bzr.*\.//}
 PORTEPOCH=	1
 CATEGORIES=	editors ipv6
 MASTER_SITES=	http://wahjava.users.sourceforge.net/
 MASTER_SITE_SUBDIR=	${PORTNAME}
-DISTNAME=	${PORTNAME}-${PORTVERSION}_${EMACS_REV}
 
 MAINTAINER=	ashish@FreeBSD.org
 COMMENT=	GNU editing macros
@@ -27,7 +25,7 @@ CONFLICTS=	emacs-19.* emacs-21.* emacs-22.* emacs-23.* \
 INSTALLS_ICONS=	yes
 
 EMACS_VER=	24.0.50
-EMACS_REV=	20100605
+EMACS_REV=	bzr100530.20100605
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USE_BZIP2=	yes
%%
Comment 9 Ashish SHUKLA freebsd_committer freebsd_triage 2010-06-13 13:29:25 UTC
Anonymous  writes:
> Please, don't abuse PORTREVISION. It's not meant to be a part of DISTNAME.


>   PORTREVISION is commonly used to indicate that an update has happened
>   that affects the *port framework itself*, but not the distributed
>   software (e.g., local patches or Makefile changes).


You're right. I'll modify that.

> And it'd be better if you used Bazaar revision number for EMACS_REV
> along with *commit date*, not the date you checked out, e.g.


>   EMACS_REV = bzr100530.20100604


bzr doesn't work for me. I'm on a 512 Kbps downstream internet connection, and
bzr doesn't stay alive for n hours, and when it terminates, it never
resumes. So, I use git repo[1]. But I think I can find out corresponding bzr
checkout from the git commit. So instead of using EMACS_REV based on date,
I'll just use bzr revision no., as date won't be accurate as git mirror is
only synchronized every 6 hours.

> I had to guess last commit based on lisp/ChangeLog so I could check that
> the sources were pristine.


Thats not always right[2], which is why I added the date when I pulled the
sources.

I'll push the latest snapshot along with the changes you recommended soon.

References:
[1]  http://repo.or.cz/w/emacs.git
[2]  http://repo.or.cz/w/emacs.git/commitdiff/37f5b158c9664beb9d4047350d2ec819f8f1a6b3

Thanks
-- 
Ashish SHUKLA

Sent via Gnus from GNU Emacs
Comment 10 swell.k 2010-06-14 22:34:06 UTC
ashish@FreeBSD.org (Ashish SHUKLA) writes:

> I'll push the latest snapshot along with the changes you recommended soon.

Can you compress the snapshot using USE_XZ?

  $ for f (emacs*) du -Ah $f && \
      echo -n USE_${f:e:s/bz/bzip/:u}\  && \
      time tar xOf $f >/dev/null

   26M    emacs-24.0.50_20100605.tar.bz2
  USE_BZIP2 tar xOf $f > /dev/null  3.27s user 0.01s system 99% cpu 3.276 total

   22M    emacs-24.0.50_20100605.tar.xz
  USE_XZ tar xOf $f > /dev/null  1.92s user 0.02s system 99% cpu 1.943 total
Comment 11 Ashish SHUKLA freebsd_committer freebsd_triage 2010-06-15 05:32:28 UTC
Anonymous  writes:
> ashish@FreeBSD.org (Ashish SHUKLA) writes:


>> I'll push the latest snapshot along with the changes you recommended soon.


> Can you compress the snapshot using USE_XZ?


Sure.

Thanks
Ashish SHUKLA
-- 
Sent via Gnus from GNU Emacs

They who can give up essential liberty to obtain a little temporary safety,
deserve neither liberty nor safety.
  -- Benjamin Franklin, Memoirs of the life and writings of Benjamin Franklin
Comment 12 Ashish SHUKLA freebsd_committer freebsd_triage 2010-06-16 17:36:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ashish

Submitter has access to the GNATS.
Comment 13 Ashish SHUKLA freebsd_committer freebsd_triage 2010-06-19 18:44:11 UTC
Attached is the updated editors/emacs-devel port with suggestions by
swell.k@gmail.com incorporated.

Thanks
-- 
Ashish SHUKLA

Sent via Gnus from GNU Emacs
Comment 14 swell.k 2010-07-24 18:48:11 UTC
- store game scores in /var rather than PREFIX/var (idea from games/wesnoth)
- don't remove non-empty scores

BTW, plist changes for 100884 - http://pastebin.com/0bNMV9Br

--- a.diff begins here ---
diff --git editors/emacs-devel/Makefile editors/emacs-devel/Makefile
index 2ab7906..99a3016 100644
--- editors/emacs-devel/Makefile
+++ editors/emacs-devel/Makefile
@@ -31,6 +31,7 @@ GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USE_XZ=		yes
 CONFIGURE_ENV+=	CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
+CONFIGURE_ARGS=	--localstatedir=/var
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 LICENSE=	GPLv3
diff --git editors/emacs-devel/pkg-plist editors/emacs-devel/pkg-plist
index 1395c50..d9021fc 100644
--- editors/emacs-devel/pkg-plist
+++ editors/emacs-devel/pkg-plist
@@ -3826,8 +3826,6 @@ share/icons/hicolor/48x48/apps/emacs.png
 share/icons/hicolor/48x48/apps/emacs22.png
 share/icons/hicolor/scalable/apps/emacs.svg
 share/icons/hicolor/scalable/mimetypes/emacs-document.svg
-var/games/emacs/snake-scores
-var/games/emacs/tetris-scores
 %%SOURCES%%@dirrm %%DATADIR%%/%%EMACS_VER%%/src
 @dirrm %%DATADIR%%/%%EMACS_VER%%/site-lisp
 @dirrm %%DATADIR%%/%%EMACS_VER%%/lisp/vc
@@ -3906,9 +3904,6 @@ var/games/emacs/tetris-scores
 @dirrm libexec/emacs/%%EMACS_VER%%/%%EMACS_ARCH%%
 @dirrm libexec/emacs/%%EMACS_VER%%
 @dirrm libexec/emacs
-@dirrmtry var/games/emacs
-@dirrmtry var/games
-@dirrmtry var
 @dirrmtry share/icons/hicolor/scalable/mimetypes
 @dirrmtry share/icons/hicolor/scalable/apps
 @dirrmtry share/icons/hicolor/scalable
@@ -3925,3 +3920,6 @@ var/games/emacs/tetris-scores
 @dirrmtry share/icons/hicolor
 @dirrmtry share/icons
 @dirrmtry share/applications
+@unexec if [ ! -s /var/games/emacs/snake-scores ]; then rm -f /var/games/emacs/snake-scores; fi
+@unexec if [ ! -s /var/games/emacs/tetris-scores ]; then rm -f /var/games/emacs/tetris-scores; fi
+@unexec rmdir /var/games/emacs 2>/dev/null || true
--- a.diff ends here ---
Comment 15 dfilter service freebsd_committer freebsd_triage 2010-07-28 13:23:18 UTC
ashish      2010-07-28 12:23:02 UTC

  FreeBSD ports repository

  Modified files:
    editors/emacs-devel  Makefile distinfo pkg-plist 
    editors/emacs-devel/files patch-Makefile.in 
  Added files:
    editors/emacs-devel/files patch-configure 
  Removed files:
    editors/emacs-devel/files patch-src-image.c 
  Log:
  - Add OPTIONS to the port.
  - Add the LICENSE information to the port.
  - Fix building of port on 6.x/9.x with DBUS option enabled, provided
    by swell.k@gmail.com.
  - Remove unneeded dependencies on gettext and dbus-glib.
  - Remove ALSA detection logic from configure script.
  
  PR:             ports/147546
  Approved by:    tabthorpe (mentor)
  
  Revision  Changes    Path
  1.43      +187 -63   ports/editors/emacs-devel/Makefile
  1.21      +3 -3      ports/editors/emacs-devel/distinfo
  1.10      +15 -12    ports/editors/emacs-devel/files/patch-Makefile.in
  1.1       +167 -0    ports/editors/emacs-devel/files/patch-configure (new)
  1.3       +0 -47     ports/editors/emacs-devel/files/patch-src-image.c (dead)
  1.21      +608 -111  ports/editors/emacs-devel/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 16 Ashish SHUKLA freebsd_committer freebsd_triage 2010-07-28 13:31:20 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!