Bug 61069 - [patch] ports/Mk/bsd.emacs.mk is not PREFIX clean
Summary: [patch] ports/Mk/bsd.emacs.mk is not PREFIX clean
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-08 14:50 UTC by Munehiro Matsuda
Modified: 2005-04-17 19:13 UTC (History)
0 users

See Also:


Attachments
file.diff (796 bytes, patch)
2004-01-08 14:50 UTC, Munehiro Matsuda
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Munehiro Matsuda 2004-01-08 14:50:16 UTC
Building of emacs-related port will fail on byte-compiling .el files,
if PREFIX is specified .

How-To-Repeat: 1. Build dependent ports normally.
	# cd /usr/ports/x11-toolkits/Xaw3d
	# make install clean
	# cd /usr/ports/graphics/jpeg
	# make install clean
	# cd /usr/ports/graphics/tiff
	# make install clean
	# cd /usr/ports/graphics/libungif
	# make install clean
	# cd /usr/ports/graphics/png

2. Build emacs related ports with PREFIX
	# cd /usr/ports/editors/emacs21
	# make PREFIX=/usr/local/emacs21 install clean
	# cd /usr/ports/editors/tamago
	# make PREFIX=/usr/local/emacs21 install

3. Watch tamago port fail to build due to not finding
   /usr/local/bin/emacs-21.3.
Comment 1 Pete Fritchman freebsd_committer freebsd_triage 2004-01-09 05:07:27 UTC
Responsible Changed
From-To: freebsd-ports-bugs->shige

Over to maintainer.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2004-12-23 19:07:30 UTC
Responsible Changed
From-To: shige->freebsd-ports-bugs

Maintainer was reset. 

I'm assuming this is still a problem, but someone with more understanding 
of the underlying problem should probably take a look.
Comment 3 Andrey Slusar 2005-03-05 20:45:19 UTC
Hi,

I think, patch from submitter is not fully correct. Please, review my
patch, fixed this problem:
--8<---------------cut here---------------start------------->8---
--- Mk/bsd.emacs.mk.orig	Sat Mar  5 16:57:12 2005
+++ Mk/bsd.emacs.mk	Sat Mar  5 17:04:32 2005
@@ -213,10 +213,15 @@
 #
 
 # emacsen command-line filename
-EMACS_CMD?=			${LOCALBASE}/bin/${EMACS_NAME}-${EMACS_VER}
+.if exists(${LOCALBASE}/bin/${EMACS_NAME}-${EMACS_VER})
+EMACS_BASE?=			${LOCALBASE}
+.elsif exists(${PREFIX}/bin/${EMACS_NAME}-${EMACS_VER})
+EMACS_BASE?=			${PREFIX}
+.endif
+EMACS_CMD?=			${EMACS_BASE}/bin/${EMACS_NAME}-${EMACS_VER}
 # emacsen core elisp filename
 EMACS_CORE_DIR=			${EMACS_LIBDIR_WITH_VER}/lisp/${EMACS_CORE_SUBDIR}
-EMACS_COREEL=			${LOCALBASE}/${EMACS_CORE_DIR}/startup.el
+EMACS_COREEL=			${EMACS_BASE}/${EMACS_CORE_DIR}/startup.el
 
 # emacsen libdir without ${LOCALBASE}
 EMACS_SITE_LISPDIR?=		${EMACS_LIBDIR}/site-lisp
--8<---------------cut here---------------end--------------->8---

-- 
Regards,
Andrey.
Comment 4 Sergey Matveychuk freebsd_committer freebsd_triage 2005-04-17 19:13:37 UTC
State Changed
From-To: open->closed

Committed, thanks!