From patchwork Mon Jul 27 15:27:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Chalain X-Patchwork-Id: 1337042 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=J7xvi+4I; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BFkFh4Xy6z9sPB for ; Tue, 28 Jul 2020 01:27:36 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 84ABD203A2; Mon, 27 Jul 2020 15:27:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NrjcoFCsFRGe; Mon, 27 Jul 2020 15:27:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id B8CF5203D0; Mon, 27 Jul 2020 15:27:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id AAAED1BF3A0 for ; Mon, 27 Jul 2020 15:27:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A68AE8785E for ; Mon, 27 Jul 2020 15:27:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ywV019AUOO2O for ; Mon, 27 Jul 2020 15:27:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9BC3E876EF for ; Mon, 27 Jul 2020 15:27:27 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id g8so3371936wmk.3 for ; Mon, 27 Jul 2020 08:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=43mn8y/vCblGb1jTT+WFUu7Vxy2RwWQpnuMKTAYuzHY=; b=J7xvi+4I51niHirZGCsuq0k4VR9oQQLuFa9PUxnQEdOnSIhiVNikdst3DFp99hr2Bv KxQXGFMkoEVBq/hJl+h9AvbvHBtUM6MLitsbiVeILwWSeZdhPTolEj6vsxzo/bg9hEBW 1BKuDOmTpFQg/gK4/ErRB8BM1gCcQswBzT3nss3ZX+KETGb1P8oMBALIGSKtitB4OsXl Gy+mpq3HTxrVxQVJWWLgHm5U653b0pXb2OoYuFgW7o6vAIgMeU6VXWtvXE0jqdaKaoqW B/hYk4D47KCM7+yKTHVOgZIat+8V8UJos2e+Ri+yqRJSpb+ieHFAycM0YkiCWDSqRTvj Phsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=43mn8y/vCblGb1jTT+WFUu7Vxy2RwWQpnuMKTAYuzHY=; b=Dom8QGugi64+EYFGYy1IdSpTv29JAAMb+DhI1aqq9Q2HkFz2VSsHNsUDF2sbiFrnd3 nrchCnoBMOMi4ByQ9W32ZrZANg+NmQRoHhSAqYzKUj7mvNP28WtQpMjX6ynqVuVn/0Ru 9AyfcyzfQvZo4fhgUoq8VDMt51CylzTp5yNM2QN3mfKNmqh1FyQsANm49YLVKmHjAkJm SXut5kw7K1DgP8bJll1buV/bsECm1n/q660LjqoOIOaVYAea0FpkzSEFA3R/CDYLiQnE rNC51wEwU41/gb8XW3yjmp017+8oQygqWjonrerSW24j5V4bbGSTJS35teACs57S1xrM 6FAg== X-Gm-Message-State: AOAM532e2vScvNssw55tkiqZZexnEmqDvOOHpCCAtWcL53IOm9Lg5DnU 3PkQfYWonALtof7YyOjZpNagU/qz X-Google-Smtp-Source: ABdhPJxQV3gyR+QWIWj7ImvoJGYq5tL5ffFyRfkUXoQ70wwjRoI1+sbUKHtjDuL7NoQgK7roM2ZGWg== X-Received: by 2002:a1c:f609:: with SMTP id w9mr20879644wmc.150.1595863645253; Mon, 27 Jul 2020 08:27:25 -0700 (PDT) Received: from cush.home ([2a01:cb15:817e:2500:8ab6:dc03:318a:34e2]) by smtp.googlemail.com with ESMTPSA id n12sm12827105wrg.77.2020.07.27.08.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 08:27:24 -0700 (PDT) From: Marc Chalain To: buildroot@buildroot.org Date: Mon, 27 Jul 2020 17:27:20 +0200 Message-Id: <20200727152720.8427-1-marc.chalain@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH 1/1] package/alac: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Chalain MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Marc Chalain The Apple Lossless Audio Codec (ALAC) is an audio codec developed by Apple and supported on iPhone, iPad, most iPods, Mac and iTunes. ALAC is a data compression method which reduces the size of audio files with no loss of information. A decoded ALAC stream is bit-for-bit identical to the original uncompressed audio file. https://macosforge.github.io/alac/ A patch fix problem to link the convert utility with libalac.a Signed-off-by: Marc Chalain --- package/Config.in | 1 + ...rary-and-objects-to-link-all-symbols.patch | 26 ++++++++++++++ package/alac/Config.in | 16 +++++++++ package/alac/alac.hash | 2 ++ package/alac/alac.mk | 35 +++++++++++++++++++ 5 files changed, 80 insertions(+) create mode 100644 package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch create mode 100644 package/alac/Config.in create mode 100644 package/alac/alac.hash create mode 100644 package/alac/alac.mk diff --git a/package/Config.in b/package/Config.in index 5c30d27b7a..4a03a67a0d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1239,6 +1239,7 @@ endmenu menu "Libraries" menu "Audio/Sound" + source "package/alac/Config.in" source "package/alsa-lib/Config.in" source "package/alure/Config.in" source "package/aubio/Config.in" diff --git a/package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch b/package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch new file mode 100644 index 0000000000..580a18d3a6 --- /dev/null +++ b/package/alac/0001-reorder-library-and-objects-to-link-all-symbols.patch @@ -0,0 +1,26 @@ +convert-utility: reorder library and objects to link all symbols + +Signed-off-by: Marc Chalain + +--- a/convert-utility/makefile ++++ b/convert-utility/makefile +@@ -1,7 +1,8 @@ + # alacconvert make + + CFLAGS = -g -O3 -c +-LFLAGS = -Wall -L$(CODECDIR) -lalac ++LFLAGS = -Wall -L$(CODECDIR) ++LIBS = -lalac + CC = g++ + + SRCDIR = . +@@ -30,7 +31,7 @@ CAFFileALAC.o + + alacconvert: $(OBJS) + (cd $(CODECDIR); $(MAKE)) +- $(CC) $(LFLAGS) $(OBJS) -o alacconvert ++ $(CC) $(LFLAGS) $(OBJS) $(LIBS) -o alacconvert + + main.o : main.cpp + $(CC) -I $(INCLUDES) $(CFLAGS) main.cpp + diff --git a/package/alac/Config.in b/package/alac/Config.in new file mode 100644 index 0000000000..2f1d4a1077 --- /dev/null +++ b/package/alac/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_ALAC + bool "Apple Lossless Audio Codec" + help + Alac is an audio codec developed by Apple and + supported on iPhone, iPad, most iPods, Mac and + iTunes. ALAC is a data compression method which + reduces the size of audio files with no loss + of information. A decoded ALAC stream is bit-for-bit + identical to the original uncompressed audio file + + https://macosforge.github.io/alac/ + + +config BR2_PACKAGE_ALAC_CONVERT + bool "binary converter" + depends on BR2_PACKAGE_ALAC diff --git a/package/alac/alac.hash b/package/alac/alac.hash new file mode 100644 index 0000000000..9477916558 --- /dev/null +++ b/package/alac/alac.hash @@ -0,0 +1,2 @@ +sha256 98635ece42fb1c3fceb75eaa4b5164d866e09f0195b3e7ec4085f1123c5e272f alac-c38887c5c5e64a4b31108733bd79ca9b2496d987.tar.gz +sha256 a337314dd82d26791112c1e5a85725b2eb92f5b7e6f9102fa4eaa2903f77518f LICENSE diff --git a/package/alac/alac.mk b/package/alac/alac.mk new file mode 100644 index 0000000000..64227eaa2e --- /dev/null +++ b/package/alac/alac.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# alac +# +################################################################################ + +ALAC_VERSION = c38887c5c5e64a4b31108733bd79ca9b2496d987 +ALAC_SITE =$(call github,macosforge,alac,$(ALAC_VERSION)) +ALAC_LICENSE = APACHE +ALAC_LICENSE_FILES = LICENSE +ALAC_INSTALL_STAGING = YES + +ALAC_MAKE_OPTS = CC=$(TARGET_CXX) + +ifeq ($(BR2_PACKAGE_ALAC_CONVERT),y) +define ALACCONVERT_BUILD_CMDS + $(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/convert-utility +endef +define ALAC_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/convert-utility/alacconvert $(TARGET_DIR)/usr/bin +endef +endif + +define ALAC_BUILD_CMDS + $(MAKE) $(ALAC_MAKE_OPTS) -C $(@D)/codec + $(ALACCONVERT_BUILD_CMDS) +endef + +define ALAC_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/codec/libalac.a $(STAGING_DIR)/usr/lib/libalac.a + $(INSTALL) -D -m 644 $(@D)/codec/ALACDecoder.h $(STAGING_DIR)/usr/include/ALACDecoder.h + $(INSTALL) -D -m 644 $(@D)/codec/ALACEncoder.h $(STAGING_DIR)/usr/include/ALACEncoder.h +endef + +$(eval $(generic-package))