summaryrefslogtreecommitdiff
path: root/recipes/nettle
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-07-24 10:20:17 +0530
committerSebastian Dröge <sebastian@centricular.com>2016-07-25 10:50:21 +0300
commit1222021a83fd917cd233642e4e27b9626e0cc69e (patch)
tree1e888f2a7718679f85abd170e0a595cfe1bd7196 /recipes/nettle
parent783cbeff6ab30fa1c43457ba1dd65f47db17aa72 (diff)
nettle.recipe: Fix library names in pkg-config files on Windows
Diffstat (limited to 'recipes/nettle')
-rw-r--r--recipes/nettle/nettle.recipe12
1 files changed, 11 insertions, 1 deletions
diff --git a/recipes/nettle/nettle.recipe b/recipes/nettle/nettle.recipe
index a489e82c..15209846 100644
--- a/recipes/nettle/nettle.recipe
+++ b/recipes/nettle/nettle.recipe
@@ -12,7 +12,7 @@ class Recipe(recipe.Recipe):
name = 'nettle'
version = '3.2'
stype = SourceType.TARBALL
- url = 'http://www.lysator.liu.se/~nisse/archive/nettle-{0}.tar.gz'.format(version)
+ url = 'https://ftp.gnu.org/gnu/nettle/nettle-{0}.tar.gz'.format(version)
licenses = [License.LGPLv2_1Plus]
configure_options = '--enable-shared --enable-public-key'
@@ -47,6 +47,16 @@ class Recipe(recipe.Recipe):
self.config.target_platform, deps)
libtool_la.save()
+ if self.config.target_platform == Platform.WINDOWS:
+ # On Windows, since the DLL does not have soversioning in the file
+ # extension, the major version is added to the library name. So
+ # hogweed -> hogweed-4, nettle -> nettle-6. Edit the pkg-config file
+ # accordingly.
+ shell.replace(os.path.join(self.config.libdir, 'pkgconfig', 'hogweed.pc'),
+ {'-lhogweed': '-lhogweed-4'})
+ shell.replace(os.path.join(self.config.libdir, 'pkgconfig', 'nettle.pc'),
+ {'-lnettle': '-lnettle-6'})
+
if self.config.target_platform == Platform.LINUX:
# Fix the libs permissions to 0755 to make the rpm packaging happy.
# Setting for all linux distros as this may affect suse as well.