Ticket #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
comment:1 Changed 5 years ago by macsforever2000@…
- Owner changed from macports-tickets@… to sfiera@…
comment:2 Changed 5 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 follow-up: ↓ 4 Changed 5 years ago by jmr@…
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 5 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:6 Changed 5 years ago by jmr@…
But is pkg-config --version different to libtasn1-config --version? Might need to translate --version to --modversion.
comment:9 Changed 5 years ago by jmr@…
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 follow-up: ↓ 11 Changed 5 years ago by devans@…
- 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 5 years ago by devans@…
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 4 years ago by anonymous
- Milestone Port Enhancements deleted
Milestone Port Enhancements deleted
comment:13 Changed 4 years ago by blb@…
Are there any ports remaining that would need this, or should we close this?
comment:14 Changed 3 years ago by jmr@…
- Status changed from new to closed
- Resolution set to fixed
Assuming this isn't a problem any more based on lack of response to comment:13.


Assigning to maintainer.