Bug 136213 - new port editors/diakonos
Summary: new port editors/diakonos
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: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-01 10:00 UTC by Chris Petrik
Modified: 2009-07-08 02:27 UTC (History)
0 users

See Also:


Attachments
file.shar (11.67 KB, text/plain)
2009-07-01 10:00 UTC, Chris Petrik
no flags Details
diakonos-Makefile.diff (1.10 KB, patch)
2009-07-03 03:32 UTC, Chris Petrik
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Petrik 2009-07-01 10:00:14 UTC
A Linux editor for the masses.

A nice editor made in ruby.

Fix: Patch attached with submission follows:
Comment 1 Chris Petrik 2009-07-01 10:11:16 UTC
The port should work without issue, as I now test it using tinderbox 
before submitting. I would very much appreciate it if I could get 
suggestions or ways to do it better privately please :)

Chris
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2009-07-02 23:42:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

I'll take it.
Comment 3 Chris Petrik 2009-07-03 03:32:39 UTC
Hello,

This is a patch to fix the ruby command not found and also fixes the 
help as the author uses a installation.rb file to tell where it installs 
all the files.

Since this script installs using its own install.rb file I thought that 
wouldnt be a good thing to just do a
${EXEC} ${WRKSRC}/install.rb --prefix=${LOCALBASE} etc..

The installation.rb will be useless if someone changes the prefix using 
a port command such ass make install -DPREFIX=~/ etc..

This is on my TODO list, but the port works :)

Comment 4 Dmitry Marakasov 2009-07-05 23:17:12 UTC
* Chris Petrik (c.petrik.sosa@gmail.com) wrote:

>  +	@${REINPLACE_CMD} 's|ruby|ruby19|g' ${WRKSRC}${f}
>   	${INSTALL_SCRIPT} ${WRKSRC}${f} ${PREFIX}/bin

This is incorrect. In shebangs for ruby scripts, either `${RUBY}' or
`bin/env ruby' (literally) should be used.

Also concerning this port:

- You cannot redefine RUBY_VERSION (see bsd.ruby.mk). RUBY_VER is likely
  what you want, but does this really need specifically ruby18? Ebuild
  uses ruby19.
- Please use %%DATADIR%% and %%DOCSDIR%% in pkg-plist. As the docs are
  installed conditionally, you'll also need %%PORTDOCS%%
- Same thing, please use ${DATADIR} and ${DOCSDIR} in the Makefile
- No need for `.if !exists' in Makefile except for configs. Data should
  be just installed into ${DATADIR}, docs should just be installed into
  ${DOCSDIR}.
- For configs, following should done (example games/magicor)

do-install:
	${INSTALL_DATA} ${WRKSRC}/foo.conf ${PREFIX}/etc/foo.conf.dist
	if [ ! -f ${PREFIX}/etc/foo.conf ]; then \
		${INSTALL_DATA} ${PREFIX}/etc/foo.conf.dist ${PREFIX}/etc/foo.conf; \
	fi

pkg-plist:
@unexec if cmp -s %D/etc/foo.conf.dist %D/etc/foo.conf; then rm -f %D/etc/foo.conf; fi
etc/foo.conf.dist
@exec if [ ! -f %B/foo.conf ]; then cp -p %D/%F %B/foo.conf; fi


This way etc/foo.conf.dist is installed as a usual file, i.e.
overwritten each time, and foo.conf is installed in a clever way:
- on installation, it is copied from .dist, but never overwritten
- on deinstallation, it is removed only if it's equal to .dist (i.e.
  unchanged).

This way user's changes to config files are never lost.

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amdmi3@amdmi3.ru  ..:  jabber: amdmi3@jabber.ru    http://www.amdmi3.ru
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2009-07-05 23:17:19 UTC
State Changed
From-To: open->feedback

Awaiting submitters feedback
Comment 6 Dmitry Marakasov freebsd_committer freebsd_triage 2009-07-08 02:23:48 UTC
State Changed
From-To: feedback->open

All issues resolved
Comment 7 Dmitry Marakasov freebsd_committer freebsd_triage 2009-07-08 02:27:28 UTC
State Changed
From-To: open->closed

New port added. Thanks!