Bug 204282 - [NEW PORT]: devel/gecode3: gecode version 3.7.3 is needed for compatibility for dep-selector-libgecode rubygem.
Summary: [NEW PORT]: devel/gecode3: gecode version 3.7.3 is needed for compatibility f...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Alexey Dokuchaev
URL:
Keywords:
: 204284 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-04 13:43 UTC by Mahdi Mokhtari
Modified: 2018-02-10 18:32 UTC (History)
6 users (show)

See Also:


Attachments
shar file of my port (23.43 KB, text/plain)
2015-11-04 13:43 UTC, Mahdi Mokhtari
no flags Details
New (Makefile Edited) version of shar file of port (23.94 KB, text/plain)
2015-11-04 16:17 UTC, Mahdi Mokhtari
no flags Details
Newer version (Makefile Edited and Patched [Bash-ism defeated]) of shar file of my port (23.99 KB, text/plain)
2015-11-04 16:50 UTC, Mahdi Mokhtari
no flags Details
After defeating Bash-ism, solved a simple portlint warning (whitespace) (23.94 KB, text/plain)
2015-11-04 16:59 UTC, Mahdi Mokhtari
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mahdi Mokhtari freebsd_committer freebsd_triage 2015-11-04 13:43:47 UTC
Created attachment 162770 [details]
shar file of my port

This version (3.7.3) of port is provided despite latest version,
in order to provide compatibility for dep-selector-libgecode ruby gem.
which is dependency for berkshelf and other infrastructure management and task automation software
Comment 1 Mahdi Mokhtari freebsd_committer freebsd_triage 2015-11-04 14:03:17 UTC
Later, I will submit ports depends on this special port!
Comment 2 Alexey Dokuchaev freebsd_committer freebsd_triage 2015-11-04 14:40:13 UTC
*** Bug 204284 has been marked as a duplicate of this bug. ***
Comment 3 Alexey Dokuchaev freebsd_committer freebsd_triage 2015-11-04 15:31:59 UTC
> # Created by: mokhi64@gmail.com

While not required, it's better (more consistent with other ports) to provide fully-qualified email address and $FreeBSD$ id tag:

> # Created by: John Doe <mokhi64@gmail.com>
> $FreeBSD$

Portlint should catch this error by the way, but you already know this. ;-)

> COMMENT=        Generic Constraint Development Environment (Needed for dep-selector-libgecode and berkshelf)

COMMENT line is too long (again, portlint(1) should've caught that) and the the part in parenthesis is useless, as are excessive capitalizations.  Correct COMMENT should be something like:

> COMMENT=        Generic constraint development environment

Here, BUILD_DEPENDS typically come before LIB_DEPENDS:

> LIB_DEPENDS=    libmpfr.so:${PORTSDIR}/math/mpfr
> BUILD_DEPENDS=  bash:${PORTSDIR}/shells/bash

Also, usually build-depends on bash(1) can be easily fixed as it often due to linuxisms, not the actual bash(1) features that to do map easily to BSD sh(1) syntax.

> CONFIGURE_ARGS= [long list of options]

Are they really all needed?  Typically you'd only want to change the defaults, not list them all. ;-)

> MAKE_JOBS_UNSAFE=yes

Did you try to fix it so it becomes jobs-safe?

> SHLIB=          37
> ...
> PLIST_SUB=      SHLIB="${SHLIB}"

SHLIB variable is used only once (quoted above).  Consider doing this instead:

> PLIST_SUB=      SHLIB=PORTVERSION:R

In this place in Makefile, knobs are also not well sorted (style bug).

> GIST_CONFIGURE_ON=      --enable-gist --enable-qt
> GIST_CONFIGURE_OFF=     --disable-gist --disable-qt

Consider using GIST_CONFIGURE_ENABLE knob(s) instead.

> .include <bsd.port.options.mk>
>         
> .if ${ARCH} == "amd64"
> CFLAGS+=        -D__USE_ISOC99
> .endif

Setting CFLAGS_amd64 would DTRT and you'd also won't have to include <bsd.port.options.mk> here.

> post-install:
>         @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/fz
> #       @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgecode*.so.[0-9]*.[0-9]*

Why the last line is commented?  Also, consider using INSTALL_TARGET=install-strip if configure script supports it.

In pkg-plist: @dirrmtry lines are not required anymore.  Now, about the patch:

> --- configure.orig
> +++ configure
> @@ -1,4 +1,4 @@
> -#! /bin/sh
> +#! /usr/bin/env bash
>  # From configure.ac Id: configure.ac.in 12614 2012-03-22 01:42:32Z tack .
>  # Guess values for system-dependent variables and create Makefiles.
>  # Generated by GNU Autoconf 2.68 for GECODE 3.7.3.

What's wrong with /bin/sh?  Why this port needs bash(1)?
Comment 4 Mahdi Mokhtari freebsd_committer freebsd_triage 2015-11-04 16:17:36 UTC
Created attachment 162778 [details]
New (Makefile Edited) version of shar file of port
Comment 5 Mahdi Mokhtari freebsd_committer freebsd_triage 2015-11-04 16:50:57 UTC
Created attachment 162780 [details]
Newer version (Makefile Edited and Patched [Bash-ism defeated]) of shar file of my port

All points (that noticed before by "Alexey Dokuchaev") solved.
Bash-ism defeated too! (see patch inside [patch-configure])
Comment 6 Mahdi Mokhtari freebsd_committer freebsd_triage 2015-11-04 16:59:02 UTC
Created attachment 162781 [details]
After defeating Bash-ism, solved a simple portlint warning (whitespace)

After defeating Bash-ism, solved "WARN: Makefile: [72]: whitespace before end of line."

Now everything works fine.
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-02-10 14:51:29 UTC
Any news here?
Comment 8 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-02-10 16:53:49 UTC
(In reply to w.schwarzenfeld from comment #7)
Well...
It was for much old time...
I don't think it's relevant anymore (since the ruby-default is now updated in tree)
Comment 9 Walter Schwarzenfeld freebsd_triage 2018-02-10 17:49:53 UTC
Ok, so I close here.
Comment 10 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-02-10 18:32:22 UTC
(In reply to w.schwarzenfeld from comment #9)
Thanks a lot =)