Skip to content

Commit

Permalink
Add ebuild for libb64
Browse files Browse the repository at this point in the history
  • Loading branch information
Pinkbyte committed Oct 9, 2013
1 parent bef089f commit 1dcdc56
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dev-libs/libb64/Manifest
@@ -0,0 +1,4 @@
AUX libb64-1.2.1-build-shared-lib.patch 730 SHA256 3a342b55e9e06d1d0c5a43348bc9b995c96a6db095861758dcd462a9b41e99f0 SHA512 b8895d4920c3a2904e8f7af9c36231862da77e9fa48cf26a6de2b24c7d44c9d4d88871d401d01283caa45d893df75d32a9f1b5a1045096d679ca8992179ff35e WHIRLPOOL 775658d63ca5b7d92b5d6c8939ed8ff6ca0fef3d13e6578639b87d4a3fc97103e8995e172575805527ffb3e438060196e9037818b5e8a4fd931153a7c584aa76
DIST libb64-1.2.1.zip 23316 SHA256 20106f0ba95cfd9c35a13c71206643e3fb3e46512df3e2efb2fdbf87116314b2 SHA512 8b1e5c8086a38be82471b5f37393f3f236c923f4a2bb737209a297cbab32a9f0a5c4af4ac912c695f0f7d8ff9458d97ce0d01092fbacbfe7181e4fd816e2153d WHIRLPOOL c31b8581adaa8516527f35e63aafe8ca93a6cef783fe416063cee2313bcc6ae41b7dd8efd75bba778954cafeaad250090b18df706ba349b684c84908387abe26
EBUILD libb64-1.2.1.ebuild 818 SHA256 fe4d06986d2f67ed52913896d2f48679f80e1f0f79fe51f830dfa4cec976bbb9 SHA512 e7532937a5d5b508ef7ff2ccbd59bf775920f67698bbd7a0d880d905c198e62f3588e18daf0cb9e130b1e1a4c1437412ea1dbb16e413c1b3a705c191b88ac666 WHIRLPOOL 6fc4b52ced2c8bcaef7ca3b8cb5205f750981c730c9bfe231da596972e583d307a6c04d3651a1a66a04fec86e8b88c5e70974562f4d85667b6a2f1204edf7f10
MISC metadata.xml 231 SHA256 7596f4acd11f03a92d9066e5e12cb03e424f10e74c2cf1019101ee09c54186b4 SHA512 6a5adf9639104e5c81462c7ed84d06e5d70b7db33d6820f8fd5e0fac39a5b3c079d9a02d066def8a4a61c56ddaea7a19e1bb62fad6555a0ecc87dd2b652196d9 WHIRLPOOL 92227640d49b57878f75bf98cd589dd91a9f7dfd6f38c330d60a42ecd82f66d9d72413711d0873e59d190865e5c17cc74e898eae01f5c18238a2ee5c299a6e90
34 changes: 34 additions & 0 deletions dev-libs/libb64/files/libb64-1.2.1-build-shared-lib.patch
@@ -0,0 +1,34 @@
--- src/Makefile.orig 2013-06-18 16:49:36.000000000 +0400
+++ src/Makefile 2013-10-09 12:59:45.000000000 +0400
@@ -1,9 +1,8 @@
-LIBRARIES = libb64.a
+LIBRARIES = libb64.so

# Build flags (uncomment one)
#############################
# Release build flags
-CFLAGS += -O3
#############################
# Debug build flags
#CFLAGS += -g
@@ -15,8 +14,7 @@

LINK.o = gcc

-CFLAGS += -Werror -pedantic
-CFLAGS += -I../include
+CFLAGS += -I../include -fPIC -shared

vpath %.h ../include/b64

@@ -24,8 +22,8 @@

all: $(TARGETS) #strip

-libb64.a: cencode.o cdecode.o
- $(AR) $(ARFLAGS) $@ $^
+libb64.so: cencode.o cdecode.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libb64.so.1 $^ -o $@

strip:
strip $(BINARIES) *.exe
41 changes: 41 additions & 0 deletions dev-libs/libb64/libb64-1.2.1.ebuild
@@ -0,0 +1,41 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit eutils multilib toolchain-funcs

DESCRIPTION="C/C++ routines for fast encoding/decoding data into and from a base64-encoded format"
HOMEPAGE="http://libb64.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.zip"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="static-libs"

DEPEND="app-arch/unzip"
RDEPEND=""

src_prepare() {
# Respect compiler environment
tc-export CC CXX AR

# Build shared library instead of static
epatch "${FILESDIR}/${P}-build-shared-lib.patch"

epatch_user
}

src_compile() {
# Build library only
emake all_src
}

src_install() {
doheader -r include/b64
dolib.so "src/${PN}.so"
dosym "${PN}.so" "/usr/$(get_libdir)/${PN}.so.1"
}
8 changes: 8 additions & 0 deletions dev-libs/libb64/metadata.xml
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
<email>admin@pinkbyte.ru</email>
<name>Sergey Popov</name>
</maintainer>
</pkgmetadata>

0 comments on commit 1dcdc56

Please sign in to comment.