Changeset 25006


Ignore:
Timestamp:
2011-01-15T13:57:33+01:00 (7 years ago)
Author:
mirko
Message:

[packages/xmlrpc-c] use build variants to build xmlrpc-c with libxml2 as well as expat support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/libs/xmlrpc-c/Makefile

    r25005 r25006  
    2222PKG_INSTALL:=1 
    2323 
     24PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) 
     25 
    2426include $(INCLUDE_DIR)/package.mk 
    2527 
     
    2729  SECTION:=libs 
    2830  CATEGORY:=Libraries 
    29   TITLE:=XML-RPC library for C/C++ (Xmlrpc-c) - common 
    30   URL:=http://xmlrpc-c.sourceforge.net/ 
    31 endef 
    32  
    33 define Package/xmlrpc-c 
    34   SECTION:=libs 
    35   CATEGORY:=Libraries 
    36   TITLE:=XML-RPC library for C/C++ (Xmlrpc-c) 
    37   URL:=http://xmlrpc-c.sourceforge.net/ 
    38   DEPENDS:=+libxml2 +xmlrpc-c_common 
     31  TITLE:=XML-RPC library - common 
     32  URL:=http://xmlrpc-c.sourceforge.net/ 
     33endef 
     34 
     35define Package/xmlrpc-c_internal 
     36  SECTION:=libs 
     37  CATEGORY:=Libraries 
     38  TITLE:=XML-RPC library - (ueses internal expat variant) 
     39  URL:=http://xmlrpc-c.sourceforge.net/ 
     40  DEPENDS:=+xmlrpc-c_common 
     41  PROVIDES:=xmlrpc-c 
     42  VARIANT:=internal 
     43endef 
     44 
     45define Package/xmlrpc-c_libxml2 
     46  SECTION:=libs 
     47  CATEGORY:=Libraries 
     48  TITLE:=XML-RPC library - (uses libxml2) 
     49  URL:=http://xmlrpc-c.sourceforge.net/ 
     50  DEPENDS:=+xmlrpc-c_common +libxml2 
     51  PROVIDES:=xmlrpc-c 
     52  VARIANT:=libxml2 
    3953endef 
    4054 
     
    4256  SECTION:=libs 
    4357  CATEGORY:=Libraries 
    44   TITLE:=XML-RPC library for C/C++ (Xmlrpc-c) - client 
    45   URL:=http://xmlrpc-c.sourceforge.net/ 
    46   DEPENDS:=+xmlrpc-c +libcurl 
     58  TITLE:=XML-RPC library - client 
     59  URL:=http://xmlrpc-c.sourceforge.net/ 
     60  DEPENDS:=xmlrpc-c +libcurl 
    4761endef 
    4862 
     
    5064  SECTION:=libs 
    5165  CATEGORY:=Libraries 
    52   TITLE:=XML-RPC library for C/C++ (Xmlrpc-c) - server 
    53   URL:=http://xmlrpc-c.sourceforge.net/ 
    54   DEPENDS:=+xmlrpc-c 
     66  TITLE:=XML-RPC library - server 
     67  URL:=http://xmlrpc-c.sourceforge.net/ 
     68  DEPENDS:=xmlrpc-c 
    5569endef 
    5670 
     
    5872  SECTION:=libs 
    5973  CATEGORY:=Libraries 
    60   TITLE:=XML-RPC library for C/C++ (Xmlrpc-c) - abyss 
     74  TITLE:=XML-RPC library - abyss 
    6175  URL:=http://xmlrpc-c.sourceforge.net/ 
    6276  DEPENDS:=+xmlrpc-c_common 
     
    6680  SECTION:=libs 
    6781  CATEGORY:=Libraries 
    68   TITLE:=XML-RPC library for C/C++ (Xmlrpc-c) - abyss server 
     82  TITLE:=XML-RPC library - abyss server 
    6983  URL:=http://xmlrpc-c.sourceforge.net/ 
    7084  DEPENDS:=+xmlrpc-c_server +xmlrpc-c_abyss 
    7185endef 
    7286 
    73 define Package/xmlrpc-c/description 
     87define Package/xmlrpc-c/description/Default 
    7488    Programming library for writing an XML-RPC server or client in C or C++. 
    7589    XML-RPC is a standard network protocol to allow a client program to make 
     
    7791endef 
    7892 
     93Package/xmlrpc-c_common/description = $(Package/xmlrpc-c/description/Default) 
     94Package/xmlrpc-c_libxml2/description = $(Package/xmlrpc-c/description/Default) 
     95Package/xmlrpc-c_internal/description = $(Package/xmlrpc-c/description/Default) 
     96 
     97Package/xmlrpc-c_libxml2/description += Uses external libxml2 library (quite big) 
     98Package/xmlrpc-c_internal/description += Uses internal expat variant (stripped down) 
     99 
    79100CONFIGURE_ARGS+= \ 
    80         --enable-libxml2-backend \ 
    81101        --disable-wininet-client \ 
    82102        --disable-libwww-client \ 
     
    87107        --disable-cgi-server 
    88108 
    89 # define Build/Compile 
    90 #       ( cd $(PKG_BUILD_DIR)/lib/expat/gennmtab && cc -I$(PKG_BUILD_DIR) -c gennmtab.c -o gennmtab.o && cc -o gennmtab  gennmtab.o ) 
    91 #       $(call Build/Compile/Default) 
    92 # endef 
     109ifeq ($(BUILD_VARIANT),libxml2) 
     110        CONFIGURE_ARGS += \ 
     111                --enable-libxml2-backend 
     112endif 
     113 
     114ifeq ($(BUILD_VARIANT),internal) 
     115        CONFIGURE_ARGS += \ 
     116                --disable-libxml2-backend 
     117endif 
     118 
     119define Build/Compile 
     120        ( cd $(PKG_BUILD_DIR)/lib/expat/gennmtab && cc -I$(PKG_BUILD_DIR) -c gennmtab.c -o gennmtab.o && cc -o gennmtab  gennmtab.o ) 
     121        $(call Build/Compile/Default) 
     122endef 
    93123 
    94124define Build/InstallDev 
     
    120150endef 
    121151 
    122 define Package/xmlrpc-c/install 
     152define Package/xmlrpc-c_libxml2/install 
    123153        $(INSTALL_DIR) \ 
    124154                $(1)/usr/lib 
     
    129159endef 
    130160 
     161define Package/xmlrpc-c_internal/install 
     162        $(INSTALL_DIR) \ 
     163                $(1)/usr/lib 
     164 
     165        $(CP) \ 
     166                $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc.so* \ 
     167                $(1)/usr/lib/ 
     168 
     169        $(CP) \ 
     170                $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_xmltok.so* \ 
     171                $(1)/usr/lib/ 
     172 
     173        $(CP) \ 
     174                $(PKG_INSTALL_DIR)/usr/lib/libxmlrpc_xmlparse.so* \ 
     175                $(1)/usr/lib/ 
     176endef 
    131177 
    132178define Package/xmlrpc-c_server/install 
     
    177223 
    178224$(eval $(call BuildPackage,xmlrpc-c_common)) 
    179 $(eval $(call BuildPackage,xmlrpc-c)) 
     225$(eval $(call BuildPackage,xmlrpc-c_libxml2)) 
     226$(eval $(call BuildPackage,xmlrpc-c_internal)) 
    180227$(eval $(call BuildPackage,xmlrpc-c_server)) 
    181228$(eval $(call BuildPackage,xmlrpc-c_abyss)) 
Note: See TracChangeset for help on using the changeset viewer.