Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Quote vars properly.
Vsevolod Stakhov committed 11 years ago
commit 462a8815189dc928f7d9e33323d24be528818d04
parent 236b487
3 files changed +41 -7
modified configure.ac
@@ -237,23 +237,26 @@ m4_define([repos_ldadd_static], [])

dnl Add ldadd for repo
m4_define([repos_add_ldadd], [
-
	m4_append([$1], [m4_join([], [ \], m4_newline(), [    repo/], 
+
	m4_append([$1], [m4_join([], [repo/], 
		[$3], [/librepo_], 
-
		[$3], [$2.la])])
+
		[$3], [$2.la ])])
])
dnl Create makefile definition for repo
m4_define([repos_add_makefile], [
-
	m4_append([$1], [m4_join([], [ \], m4_newline(), [    libpkg/repo/], 
-
		[$2], [/Makefile])])
+
	m4_append([$1], [m4_join([], [\], m4_newline(), [libpkg/repo/], 
+
		[$2], [/Makefile ])])
])
dnl Apply macros to repos list
m4_map([m4_curry([repos_add_ldadd], [repos_ldadd], [])], [repos])
m4_map([m4_curry([repos_add_ldadd], [repos_ldadd_static], [_static])], [repos])
m4_map([m4_curry([repos_add_makefile], [repos_makefiles])], [repos])

-
AC_SUBST([REPOS], m4_expand([repos]))
-
AC_SUBST([REPOS_LDADD], m4_expand([repos_ldadd]))
-
AC_SUBST([REPOS_LDADD_STATIC], m4_expand([repos_ldadd_static]))
+
REPOS="m4_expand([repos])"
+
REPOS_LDADD="m4_normalize(m4_expand([repos_ldadd]))"
+
REPOS_LDADD_STATIC="m4_normalize(m4_expand([repos_ldadd_static]))"
+
AC_SUBST([REPOS])
+
AC_SUBST([REPOS_LDADD])
+
AC_SUBST([REPOS_LDADD_STATIC])

AC_CONFIG_FILES(Makefile \
		src/Makefile \
modified libpkg/repo/binary/Makefile.am
@@ -0,0 +1,8 @@
+
librepo_binary_la_SOURCES= dummy.c
+
librepo_binary_la_CFLAGS=	$(pkg_common_cflags) -shared
+

+
librepo_binary_static_la_LDFLAGS=	-all-static
+
librepo_binary_static_la_SOURCES=	$(librepo_binary_la_SOURCES)
+
librepo_binary_static_la_CFLAGS=	$(pkg_common_cflags) -static
+

+
noinst_LTLIBRARIES= librepo_binary.la librepo_binary_static.la

\ No newline at end of file
added libpkg/repo/binary/dummy.c
@@ -0,0 +1,23 @@
+
/* Copyright (c) 2014, Vsevolod Stakhov
+
 * All rights reserved.
+
 *
+
 * Redistribution and use in source and binary forms, with or without
+
 * modification, are permitted provided that the following conditions are met:
+
 *       * Redistributions of source code must retain the above copyright
+
 *         notice, this list of conditions and the following disclaimer.
+
 *       * Redistributions in binary form must reproduce the above copyright
+
 *         notice, this list of conditions and the following disclaimer in the
+
 *         documentation and/or other materials provided with the distribution.
+
 *
+
 * THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY
+
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+
 * DISCLAIMED. IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY
+
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
 */
+