Opened 10 years ago

Closed 10 years ago

#21641 closed submission (fixed)

meschach 1.2b-1 package

Reported by: howarth@… Owned by: mf2k (Frank Schima)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ryandesign (Ryan Schmidt)
Port: meschach

Description (last modified by ryandesign (Ryan Schmidt))

The attached packaging provides a meschach library of vector and matrix routines for use by the Pynmr plugin. The meschach cvs snapshot tarball and patches from the debian meschach package are used to insure the eliminate all known bugs and solve build issues against the current devtools.

Attachments (2)

Portfile (2.6 KB) - added by howarth@… 10 years ago.
Portfile with requested changes
meschach.diff (561 bytes) - added by howarth@… 10 years ago.
reduced patch

Download all attachments as: .zip

Change History (9)

comment:1 Changed 10 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)

comment:2 Changed 10 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

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@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 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.

Changed 10 years ago by howarth@…

Attachment: Portfile added

Portfile with requested changes

Changed 10 years ago by howarth@…

Attachment: meschach.diff added

reduced patch

comment:3 Changed 10 years ago by howarth@…

Made requested changes except that branch and major are hardcoded since version has a non-numeric character (1.2b).

comment:4 Changed 10 years ago by howarth@…

Can we get this package into the 1.8.1 ports so that we can get pynmr in as well? There should be no remaining issues with the meschach packaging.

comment:5 Changed 10 years ago by howarth@…

Ping. Can we get this packaging committed so that the pynmr package that requires it can go as well?
Thanks in advance.

comment:6 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to macsforever2000@…
Status: newassigned

comment:7 Changed 10 years ago by mf2k (Frank Schima)

Keywords: math removed
Resolution: fixed
Status: assignedclosed
Version: 1.8.0
Note: See TracTickets for help on using tickets.