[MacPorts] #21641: meschach 1.2b-1 package
MacPorts
noreply at macports.org
Sun Oct 11 19:50:53 PDT 2009
#21641: meschach 1.2b-1 package
--------------------------------------+-------------------------------------
Reporter: howarth@… | Owner: macports-tickets@…
Type: submission | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.8.0
Keywords: math | Port: meschach
--------------------------------------+-------------------------------------
Changes (by ryandesign@…):
* cc: ryandesign@… (added)
Comment:
I have several concerns about the files you submitted.
In the Portfile:
{{{
revision 1
}}}
The initial revision of any given version should be 0, not 1. To achieve
this, you can write "revision 0" or omit the revision line entirely.
{{{
maintainers howarth at bromo.med.uc.edu
}}}
You may want to obfuscate your email address by writing "maintainers
bromo.med.uc.edu:howarth"
{{{
distfiles meschach_1.2b.orig.tar.gz
}}}
You should avoid hardcoding version numbers in portfiles. In this case,
you should use "distfiles ${name}_${version}.orig.tar.gz" so that you
don't need to keep changing this line with every version update.
{{{
checksums meschach_1.2b.orig.tar.gz md5
faf05a52c1a8a44a5716c6a2d681999f \
meschach_1.2b.orig.tar.gz sha1
9cd3c102234b06a59a24f73db5cb76673614d413 \
meschach_1.2b.orig.tar.gz rmd160
bbd1d09a2b5cddd5695038f9f8477af1d0c1b0d6 \
meschach_1.2b-13.diff.gz md5
bdc7289be71d235afc92b5707f6732d2 \
meschach_1.2b-13.diff.gz sha1
da298acd0a90c9d5c78c08095800e8e725aaf378 \
meschach_1.2b-13.diff.gz rm160
7455d201f0d5ac70e091f27f4f1a5ed15d0b59fd
}}}
You don't need to keep repeating the filename before each checksum type;
it's only needed before the first one in the set. You also misspelled
"rmd160" for the patchfile's checksums. So I suggest writing:
{{{
checksums ${name}_${version}.orig.tar.gz \
md5 faf05a52c1a8a44a5716c6a2d681999f \
sha1 9cd3c102234b06a59a24f73db5cb76673614d413 \
rmd160 bbd1d09a2b5cddd5695038f9f8477af1d0c1b0d6 \
meschach_1.2b-13.diff.gz \
md5 bdc7289be71d235afc92b5707f6732d2 \
sha1 da298acd0a90c9d5c78c08095800e8e725aaf378 \
rmd160 7455d201f0d5ac70e091f27f4f1a5ed15d0b59fd
}}}
I don't mind hardcoding the version number in the name of the patchfile,
because such a patchfile is obviously meant to be specific to this version
anyway.
In the destroot phase:
{{{
file mkdir ${destroot}${prefix}/lib
}}}
You do not need to make this directory; MacPorts makes this and many other
common directories for you.
{{{
ln -s ${prefix}/lib/libmeschach.1.2.dylib
${destroot}${prefix}/lib/libmeschach.dylib
ln -s ${prefix}/lib/libmeschach.1.2.dylib
${destroot}${prefix}/lib/libmeschach.1.dylib
}}}
You should not hardcode the version number here. Compute it based on the
${version} variable. We commonly use a variable called ${branch} to
indicate the value "1.2" in this case, and a variable called ${major} to
indicate the value "1". See [wiki:PortfileRecipes#branch PortfileRecipes].
{{{
system "make torture; ./torture"
}}}
Does "make torture" compile something? If so, this should happen in the
post-build phase, not the destroot.
For both "make torture" and "./torture", these assume something about the
current working directory. MacPorts does not guarantee what the current
working directory will be, so you should "cd" to where you want to be
before each of these commands. In the post-build: 'system "cd
${worksrcpath} && make torture"'. In the destroot: 'system "cd
${worksrcpath} && ./torture"'.
In the patchfile:
{{{
Index: meschach-1.2b/makefile.in
===================================================================
--- meschach-1.2b/makefile.in.org 2009-08-20 21:46:39.000000000 -0400
+++ meschach-1.2b/makefile.in 2009-08-20 21:51:15.000000000 -0400
@@ -115,7 +115,7 @@
# $(CC) -shared -o libmeschach.so $(OLDLIST)
shared: $(ALL_LISTS)
- $(CC) -shared -o libmeschach.so $(ALL_LISTS) -lc -lm -Wl,-soname
-Wl,libmeschach.so.$(vers)
+ $(CC) -dynamiclib -o libmeschach.1.2.dylib $(ALL_LISTS) -lc -lm
-install_name @PREFIX@/lib/libmeschach.1.dylib -compatibility_version
1.2.0 -current_version 1.2.0
static: $(ALL_LISTS)
ar ru libmeschach.a $(ALL_LISTS)
}}}
Instead of hardcoding parts of the version number, it would be better to
reinplace it with the ${version}, ${branch} and ${major} variables in the
portfile, or make use of the $(vers) makefile variable I see there.
{{{
@@ -139,7 +139,7 @@
# use this only for PC machines
msdos-zip:
- /bin/rm -f $(MES_PAK).zip
- chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
+ chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \dylib
$(OTHERS) $(HLIST) `echo $(TORTURE) | sed -e 's/\.o/.c/g'`
chmod 755 configure
$(MAKE) list
}}}
This change seems suspicious, and since the comment above it says this
target is only used for PC machines, it seems unnecessary to touch this
area.
{{{
@@ -190,10 +190,10 @@
/bin/rm -f *.o core asx5213a.mat iotort.dat
cleanup:
- /bin/rm -f *.o core asx5213a.mat iotort.dat *.a *.so
+ /bin/rm -f *.o core asx5213a.mat iotort.dat *.a *.dylib
realclean:
- /bin/rm -f *.o core asx5213a.mat iotort.dat *.a *.so
+ /bin/rm -f *.o core asx5213a.mat iotort.dat *.a *.dylib
/bin/rm -f torture sptort ztorture memtort itertort mfuntort
iotort
/bin/rm -f makefile machine.h config.status maxint macheps
}}}
These hunks seem unnecessary, since they only deal with cleanup routines,
and MacPorts cleans up for you.
--
Ticket URL: <http://trac.macports.org/ticket/21641#comment:2>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list