Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104738 - [NEW EBUILD] URT - Utah Raster Toolkit
Summary: [NEW EBUILD] URT - Utah Raster Toolkit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://www.cs.utah.edu/gdc/projects/urt/
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks: 77197
  Show dependency tree
 
Reported: 2005-09-03 12:10 UTC by Michal Slonina
Modified: 2005-09-28 08:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
urt-3.1b-gentoo.diff (urt-3.1b-gentoo.diff,5.95 KB, patch)
2005-09-03 12:14 UTC, Michal Slonina
Details | Diff
urt-3.1b.ebuild (urt-3.1b.ebuild,1.65 KB, text/plain)
2005-09-03 12:18 UTC, Michal Slonina
Details
/usr/portage/license/urt (copyright,781 bytes, text/plain)
2005-09-12 06:27 UTC, Michal Slonina
Details
urt-3.1b.ebuild (urt-3.1b.ebuild,1.49 KB, text/plain)
2005-09-12 06:57 UTC, Michal Slonina
Details
urt-3.1b.ebuild - without pbm,targa,gif use flags (urt-3.1b.ebuild,1.44 KB, text/plain)
2005-09-12 07:21 UTC, Michal Slonina
Details
urt-3.1b.ebuild (urt-3.1b.ebuild,1.42 KB, text/plain)
2005-09-13 06:00 UTC, Michal Slonina
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Slonina 2005-09-03 12:10:26 UTC
The Utah Raster Toolkit is a collection of programs and C routines for dealing
with raster images commonly encountered in computer graphics. A device and
system independent image format stores images and information about them. Called
the RLE format, it uses run length encoding to reduce storage space for most images.


Reproducible: Always
Steps to Reproduce:
emerge urt
Comment 1 Michal Slonina 2005-09-03 12:14:35 UTC
Created attachment 67575 [details, diff]
urt-3.1b-gentoo.diff

Utah is a bit dated, I needed to fix some stupid bugs, like one argument XSync
etc.
Comment 2 Michal Slonina 2005-09-03 12:18:13 UTC
Created attachment 67576 [details]
urt-3.1b.ebuild
Comment 3 Michal Slonina 2005-09-03 12:20:39 UTC
The XSync problem was in 3.0 :] Me stupid :]
If you need the ebuild and patch for 3.0, mail me.
Comment 4 Ciaran McCreesh 2005-09-11 16:01:58 UTC
Please fix the following and reopen:

* http://dev.gentoo.org/~ciaranm/docs/mw-faq/license.txt
* I think your RDEPEND is probably wrong.
* No need for the \ in DEPEND. There is a need for spaces around the ( ) blocks.
* http://dev.gentoo.org/~ciaranm/docs/mw-faq/quoting.txt
* There's an fperms function that can be used instead of chmod.
* You can drop the einfo statements and shorten those lines to use blah && echo
blah >> whatever
* Any reason that gif, pbm, targa are optional if they don't pull in extra
dependencies?
* Is this sandbox friendly?
Comment 5 Michal Slonina 2005-09-12 06:27:03 UTC
Created attachment 68244 [details]
/usr/portage/license/urt

URT license doesn't fit well into any license currently available in
/usr/portage/license. ( correct me if i am wrong )
Comment 6 Michal Slonina 2005-09-12 06:57:34 UTC
Created attachment 68248 [details]
urt-3.1b.ebuild

diff -u urt-3.1b.ebuild.alt urt-3.1b.ebuild 

--- urt-3.1b.ebuild.alt 2005-09-12 14:37:02.000000000 +0200
+++ urt-3.1b.ebuild	2005-09-12 15:49:10.000000000 +0200
@@ -8,63 +8,52 @@
 HOMEPAGE="http://www.cs.utah.edu/gdc/projects/${PN}/"
 SRC_URI="ftp://ftp.iastate.edu/pub/utah-raster/${PN}-${PV}.tar.Z"

-LICENSE="other"
+LICENSE="urt"
 SLOT="0"
 KEYWORDS="~x86"
 IUSE="X gif tiff targa pbm"

-DEPEND="tiff? (media-libs/tiff) \
-		X? (virtual/x11)"
-RDEPEND=""
+DEPEND="tiff? ( media-libs/tiff )
+	X? ( virtual/x11 )"
+RDEPEND="X? ( virtual/x11 )"

 src_unpack() {
-	cd ${WORKDIR}
-	mkdir ${P}
-	cd ${S}
-	unpack ${A}
-	epatch ${FILESDIR}/${PF}-gentoo.diff
+	cd "${WORKDIR}"
+	mkdir "${P}"
+	cd "${S}"
+	unpack "${A}"
+	epatch "${FILESDIR}/${PF}-gentoo.diff"
 }


 src_compile() {
-	chmod u+w ${S}/config/urt
-	einfo Injecting portage CFLAGS to urt config file.
-	echo >>${T}/urt.conf ExtraCFLAGS=${CFLAGS}
-	if use X; then
-		einfo Compiling with X11 support.
-		echo >>${T}/urt.conf "#define X11"
-		fi
-	if use gif; then
-		einfo Compiling with gif support.
-		echo >>${T}/urt.conf "#define GIF"
-		fi
-	if use tiff; then
-		einfo Compiling with tiff support.
-		echo >>${T}/urt.conf "#define TIFF"
-		fi
-	if use targa; then
-		einfo Compiling with targa support.
-		echo >>${T}/urt.conf "#define TARGA"
-		fi
-	if use pbm; then
-		einfo Compiling with pbm support.
-		echo >>${T}/urt.conf "#define PBM"
-		fi
-	cat >>${T}/urt.conf ${S}/config/urt
-	mv ${T}/urt.conf ${S}/config/urt
-	cd ${S}/man
+	fperms u+w "${S}/config/urt"
+	einfo "Injecting portage CFLAGS to urt config file."
+	echo >>"${T}/urt.conf" "ExtraCFLAGS=${CFLAGS}"
+	use X && echo >>"${T}/urt.conf" "#define X11"
+	use gif && echo >>"${T}/urt.conf" "#define GIF"
+	use tiff && echo >>"${T}/urt.conf" "#define TIFF"
+	use targa && echo >>"${T}/urt.conf" "#define TARGA"
+	use pbm && echo >>"${T}/urt.conf" "#define PBM"
+	cat >>"${T}/urt.conf" "${S}/config/urt"
+	mv "${T}/urt.conf" "${S}/config/urt"
+	cd "${S}/man"
	cat makefile.src | awk -f ../makedef.awk > makefile
-	cd ${S}
+	cd "${S}"
	./Configure config/urt
	emake || die "emake failed"
 }

 src_install() {
	einfo install
-	cd ${S}
-	mkdir -p ${D}/usr/bin ${D}/usr/share/man/man3 ${D}/usr/share/man/man1 \

-		${D}/usr/share/man/man5 ${D}/usr/lib ${D}/usr/include
+	cd "${S}"
+	dodir "/usr/bin"
+	dodir "/usr/share/man/man3"
+	dodir "/usr/share/man/man1"
+	dodir "/usr/share/man/man5"
+	dodir "/usr/lib"
+	dodir "/usr/include"
	make install
-	dodoc ${S}/3.1-changes ${S}/CHANGES{,.raw} ${S}/README
${S}/MANIFEST.new \
-		${S}/copyright
+	dodoc "${S}/3.1-changes" "${S}/CHANGES{,.raw}" "${S}/README"
"${S}/MANIFEST.new" \
+		"${S}/copyright"
 }
Comment 7 Michal Slonina 2005-09-12 07:13:33 UTC
(In reply to comment #4)
> Please fix the following and reopen:
> * http://dev.gentoo.org/~ciaranm/docs/mw-faq/license.txt
LICENSE variable changed. License file included in this bug report.

> * I think your RDEPEND is probably wrong.
Hmm. Runtime dependency for x11 is only needed for /usr/bin/getx11 AFAIK,
however if You say it's needed, than it's my mistake, sorry.
There is no need for libtiff, libjpeg and libz in runtime environment as they 
are staticly linked.

> * No need for the \ in DEPEND. There is a need for spaces around the ( ) blocks.
Hmm. Is there an ebuild writer style guide somewhere?

> * http://dev.gentoo.org/~ciaranm/docs/mw-faq/quoting.txt
Yes, i see the point. Corrected.

> * There's an fperms function that can be used instead of chmod.
Fixed.
 
> * You can drop the einfo statements and shorten those lines to use blah && echo
> blah >> whatever
Fixed.

> * Any reason that gif, pbm, targa are optional if they don't pull in extra
> dependencies?
120kb size increase in USE="" vs USE="x11 gif pbm targa tiff", flexibility.
It's not much, i will post an updated ebuild without these flags.

> * Is this sandbox friendly?
No sandboxing problems on my system.

Comment 8 Michal Slonina 2005-09-12 07:21:36 UTC
Created attachment 68249 [details]
urt-3.1b.ebuild - without pbm,targa,gif use flags

--- urt-3.1b.ebuild.alt 2005-09-12 16:23:38.000000000 +0200
+++ urt-3.1b.ebuild	2005-09-12 16:24:35.000000000 +0200
@@ -11,7 +11,7 @@
 LICENSE="urt"
 SLOT="0"
 KEYWORDS="~x86"
-IUSE="X gif tiff targa pbm"
+IUSE="X tiff"

 DEPEND="tiff? ( media-libs/tiff )
	X? ( virtual/x11 )"
@@ -31,10 +31,10 @@
	einfo "Injecting portage CFLAGS to urt config file."
	echo >>"${T}/urt.conf" "ExtraCFLAGS=${CFLAGS}"
	use X && echo >>"${T}/urt.conf" "#define X11"
-	use gif && echo >>"${T}/urt.conf" "#define GIF"
+	echo >>"${T}/urt.conf" "#define GIF"
	use tiff && echo >>"${T}/urt.conf" "#define TIFF"
-	use targa && echo >>"${T}/urt.conf" "#define TARGA"
-	use pbm && echo >>"${T}/urt.conf" "#define PBM"
+	echo >>"${T}/urt.conf" "#define TARGA"
+	echo >>"${T}/urt.conf" "#define PBM"
	cat >>"${T}/urt.conf" "${S}/config/urt"
	mv "${T}/urt.conf" "${S}/config/urt"
	cd "${S}/man"
Comment 9 Michal Slonina 2005-09-12 07:23:26 UTC
Why should one use fperms instead of chmod? What's the rationale?
Doesn't it make portage function bloated?

Thanks for your cooperation, awaiting further instructions.
Comment 10 Ciaran McCreesh 2005-09-12 15:06:41 UTC
We use the wrapper functions like fperms for convenience. It's easier to change
things in one place rather than all over the tree -- I don't think we've had to
modify fperms for portability yet, but we have modified a whole load of other
utilities.

One other thing... The usual way of doing src_unpack is:

    unpack ${A}
    cd "${S}"

rather than the mkdir stuff. Any reason you can't do that here?
Comment 11 Michal Slonina 2005-09-13 05:51:08 UTC
(In reply to comment #10)
> 
> One other thing... The usual way of doing src_unpack is:
> 
>     unpack ${A}
>     cd "${S}"
> 
> rather than the mkdir stuff. Any reason you can't do that here?

The problem is related to the structure of urt-3.1b.tar.Z tarball.
tar -tvZf /usr/portage/distfiles/urt-3.1b.tar.Z gives the following output:
-rw-r--r-- 4137/22       14850 1994-09-09 16:37:26 MANIFEST.new
-rw-r----- 4137/22        3589 1992-02-27 21:55:49 3.1-changes
-rw-r--r-- 4137/22       14984 1991-06-07 17:58:14 CHANGES
-rw-r----- 4137/22       24883 1992-02-27 22:28:23 CHANGES.raw
-rwxr-x--x 4137/22         491 1993-11-29 19:52:53 Configure
-r--r--r-- 4137/22        5406 1991-06-07 17:58:14 README
-r--r--r-- 4137/22         158 1991-06-07 17:57:48 bin/README
-r--r--r-- 4137/22        7022 1991-06-07 17:58:15 blurb
-r--r--r-- 4137/22        1220 1992-05-04 17:22:24 cnv/README
-r--r----- 4137/22       16311 1992-04-29 22:01:13 cnv/aliastorle.c
-r--r--r-- 4137/22        4448 1992-01-28 18:51:35 cnv/cubitorle.c
-rw-r----- 4137/22       11650 1993-10-18 14:59:37 cnv/giftorle.c
-rw-r--r-- 4137/22        4096 1993-04-21 16:42:40 cnv/graytorle.c
-r--r--r-- 4137/22        3351 1992-04-30 15:56:43 cnv/iristorle.c
-r--r--r-- 4137/22        4649 1995-12-11 15:58:05 cnv/makefile.src
-r--r--r-- 4137/22        4974 1992-01-16 22:44:02 cnv/painttorle.c
-r--r--r-- 4137/22        5781 1992-04-30 15:57:30 cnv/pgmtorle.c
-r--r--r-- 4137/22        6098 1992-03-04 20:29:44 cnv/ppmtorle.c
-r--r--r-- 4137/22       11355 1992-04-30 15:58:02 cnv/rastorle.c
-r--r--r-- 4137/22       10233 1992-03-24 04:53:43 cnv/rawtorle.c
-r--r--r-- 4137/22        1208 1992-01-29 16:03:44 cnv/rla_header.h
-r--r--r-- 4137/22       14306 1992-04-30 15:58:33 cnv/rlatorle.c
-r--r--r-- 4137/22        1442 1992-01-29 16:06:20 cnv/rlb_header.h
...

1) As you see the files are not prefixed by package name directory. 
2) From the definition of ${S} variable, we know that:
   * S = "${WORKDIR}/${P}"
   * "This variable  is  used  by the functions src_compile  and
src_install.Both are executed with S as the current directory." 

If we simply issue unpack "${A}" in src_unpack we will have all the tarball
contents put simply into ${WORKDIR} and not ${S} which is by default
${WORKDIR]/${P}.

That's why first we have to create this directory, than cd into it, and then
unpack the contents of the tarball or change S variable to match extraction
directory. If the second approch is more correct, than i will be glad to fix
this issue.


Comment 12 Michal Slonina 2005-09-13 06:00:45 UTC
Created attachment 68353 [details]
urt-3.1b.ebuild

To be formaly correct we can remove the line cd ${WORKDIR} as the src_unpack
is called with the current directory set to this value.

--- urt-3.1b.ebuild.alt 2005-09-13 15:01:53.000000000 +0200
+++ urt-3.1b.ebuild	2005-09-13 14:54:03.000000000 +0200
@@ -18,7 +18,6 @@
 RDEPEND="X? ( virtual/x11 )"

 src_unpack() {
-	cd "${WORKDIR}"
	mkdir "${P}"
	cd "${S}"
	unpack "${A}"
Comment 13 Michal Slonina 2005-09-28 08:33:50 UTC
Alternative ebuild for urt-3.1b in portage cvs.