Opened 15 years ago

Closed 13 years ago

#17253 closed enhancement (fixed)

libtasn1 no longer provides libtasn1-config, let's provide one until depending packages are fixed

Reported by: bugs@… Owned by: sfiera@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: erkinbah@…, ohler+macports@…, mww@…, usx303@…
Port: libtasn1

Description

See [41968] and #17197 for examples where this is causing problems. Since it will take some time to find all the broken packages and make them not broken, perhaps the following script should be installed into /opt/local/bin/libtasn1-config and set executable as part of the libtasn1 installation:

#!/bin/bash

if [[ $1 == "--libs" ]]; then
        echo "-L/opt/local/lib -ltasn1"
fi
if [[ $1 == "--cflags" ]]; then
        echo "-I/opt/local/include"
fi
if [[ $1 == "--version" ]]; then
        echo "1.6"
fi

This will allow things to work until ports get tracked down and updated.

Here's a better version I didn't test as well that should respect people's prefixes:

#!/bin/bash
PREFIX=`cat /opt/local/etc/macports/macports.conf | grep ^prefix | cut -f 2- | xargs -n 1 echo`

if [[ $1 == "--libs" ]]; then
        echo "-L${PREFIX}/lib -ltasn1"
fi
if [[ $1 == "--cflags" ]]; then
        echo "-I${PREFIX}/include"
fi
if [[ $1 == "--version" ]]; then
        echo "1.6"
fi

Change History (14)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to sfiera@…

Assigning to maintainer.

comment:2 Changed 15 years ago by bugs@…

Actually this one is substantially better as it will try and find the actual configuration file instead of just assuming it's at the standard prefix. The advantage to this being that we can actually try and actually respect prefixes instead of just pretending to. :)

#!/bin/bash
IFS=":"
for dir in $PATH; do
if [ -e `echo ${dir}/etc/macports/macports.conf | sed s/\\\/bin//` ]; then
CONF=`echo ${dir}/etc/macports/macports.conf | sed s/\\\/bin//`
fi
done
if [ ! -e ${CONF} ]; then
echo "No configuration for macports found"
exit
fi
PREFIX=`cat ${CONF} | grep ^prefix | cut -f 2- | xargs -n 1 echo`

if [[ $1 == "--libs" ]]; then
echo "-L${PREFIX}/lib -ltasn1"
fi
if [[ $1 == "--cflags" ]]; then
echo "-I${PREFIX}/include"
fi
if [[ $1 == "--version" ]]; then
echo "1.6"
fi

comment:3 Changed 15 years ago by jmroot (Joshua Root)

Why not use pkg-config in the script? Then there's no need to jump through hoops or hardcode values.

comment:4 in reply to:  3 Changed 15 years ago by bugs@…

Replying to jmr@…:

Why not use pkg-config in the script? Then there's no need to jump through hoops or hardcode values.

That sounds like exactly what should be done... as for why I didn't do it, well, didn't really know about it. :)

#!/bin/bash
if [[ $1 == "--libs" ]]; then
echo `pkg-config --libs libtasn1`
fi
if [[ $1 == "--cflags" ]]; then
echo `pkg-config --cflags libtasn1`
fi
if [[ $1 == "--version" ]]; then
echo `pkg-config --version libtasn1`
fi

Better?

comment:5 Changed 15 years ago by blb@…

Or even

#!/bin/bash
${prefix}/bin/pkg-config $1 libtasn1

comment:6 Changed 15 years ago by jmroot (Joshua Root)

But is pkg-config --version different to libtasn1-config --version? Might need to translate --version to --modversion.

comment:7 Changed 15 years ago by erkinbah@…

Cc: erkinbah@… added

Cc Me!

comment:8 Changed 15 years ago by ohler+macports@…

Cc: ohler+macports@… added

Cc Me!

comment:9 Changed 15 years ago by jmroot (Joshua Root)

I fixed gnome-keyring using the patch from http://bugzilla.gnome.org/show_bug.cgi?id=560869 in r42286. Are there any other ports that need libtasn1-config?

comment:10 Changed 15 years ago by dbevans (David B. Evans)

Cc: mww@… usx303@… added

Additional ports that depend on libtasn1 are:

irc/bitlbee
mail/msmtp
net/gloox
security/libprelude
sysutils/ntfsprogs
textproc/iksemel                  

Ccing maintainers of msmtp and libprelude. Rest are nomaintainer.

comment:11 in reply to:  10 Changed 15 years ago by dbevans (David B. Evans)

Replying to devans@…:

Additional ports that depend on libtasn1 are:

irc/bitlbee
mail/msmtp
net/gloox
security/libprelude
sysutils/ntfsprogs
textproc/iksemel                  

None of these use libtasn1-config but rather use libgnutls-config and gnutls was fixed in r41968. The dependency on libtasn1 in these files is therefore superfluous -- a dependency on gnutls is sufficient.

comment:12 Changed 15 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

comment:13 Changed 15 years ago by blb@…

Are there any ports remaining that would need this, or should we close this?

comment:14 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Assuming this isn't a problem any more based on lack of response to comment:13.

Note: See TracTickets for help on using tickets.