* added support to Emerge -repository w/ repo/*
[t2sde.git] / package / python / python-ldap / python-ldap.conf
blob7f1ceb79c7ec8fbd949a4dbaa2083096a1e55cc4
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/python-ldap/python-ldap.conf
3 # Copyright (C) 2004 - 2023 The T2 SDE Project
4
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 python_ldap_preconf() {
14         for package in openldap openssl cyrus-sasl2; do
15                 if pkginstalled $package; then
16                         pkgprefix -t $package
17                         lib_dir="$lib_dir $(pkgprefix libdir $package)"
18                         inc_dir="$inc_dir $(pkgprefix includedir $package)"
19                 fi
20         done
21         # adjusting library and include path
22         sed -i "/library_dirs/s,/.*,$lib_dir," setup.cfg
23         sed -i "/include_dirs/s,/.*,$inc_dir," setup.cfg
24         
25         # removing hardcoded sasl from setup.cfg if cyrus-sasl2
26         # is not installed
27         if ! pkginstalled cyrus-sasl; then
28                 sed -i "s/^\(libs.*\) sasl2 \(.*\)/\1 \2/g" setup.cfg
29         fi
32 hook_add preconf 5 "python_ldap_preconf"