Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] ACS CCID PC/SC Driver added.
Date: Wed, 30 Dec 2015 14:19:27 +0100	[thread overview]
Message-ID: <20151230141927.24a250e4@free-electrons.com> (raw)
In-Reply-To: <1451475203-23925-2-git-send-email-juha@codercoded.com>

Dear Juha Rantanen,

Thanks for this contribution. See some comments below.

On Wed, 30 Dec 2015 13:33:23 +0200, Juha Rantanen wrote:

> diff --git a/package/acsccid/Config.in b/package/acsccid/Config.in
> new file mode 100644
> index 0000000..9635a99
> --- /dev/null
> +++ b/package/acsccid/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_ACSCCID
> +    bool "acsccid"

Indentation should be done with one tab.

> +    depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
> +    select BR2_PACKAGE_PCSC_LITE
> +    select BR2_PACKAGE_LIBUSB

libusb is not mandatory, you can disable using --disable-libusb.

> +    select BR2_PACKAGE_FLEX
> +    select BR2_PACKAGE_PERL

What makes you think Perl and Flex are needed?

For Flex, I see a .l file in the source, so you quite probably needs
Flex on your build machine (by adding host-flex in <pkg>_DEPENDENCIES),
but I don't see why you would need Flex on the target.

For Perl, I see it being used at build time, but not at configure time.
And since we guarantee that a Perl interpreter is available on the
build machine as hard dependency of Buildroot, you don't need anything.

> +    help
> +      acsccid is a PC/SC driver for Linux/Mac OS X and it supports ACS CCID smart card readers.

Indentation for help text is one tab + two spaces. Also, it should be
wrapped so that the lines do not have more than 72 columns.

Since your package has a dependency on threads, you need to add a
Config.in comment like this:

comment "acsccid needs a toolchain w/ threads"
	depends on !BR2_TOOLCHAIN_HAS_THREADS

See the Buildroot manual for details about this (or the numerous
examples in the Buildroot tree).

> diff --git a/package/acsccid/acsccid.mk b/package/acsccid/acsccid.mk
> new file mode 100644
> index 0000000..1325e73
> --- /dev/null
> +++ b/package/acsccid/acsccid.mk
> @@ -0,0 +1,14 @@
> +#############################################################
> +#
> +# acsccid
> +#
> +#############################################################

80 # signs are needed, and an empty new line after this header.

> +ACSCCID_VERSION = 1.1.1
> +ACSCCID_SOURCE = acsccid-$(ACSCCID_VERSION).tar.bz2
> +ACSCCID_SITE = http://downloads.sourceforge.net/acsccid
> +ACSCCID_INSTALL_STAGING = YES
> +ACSCCID_INSTALL_TARGET = YES

Not needed, this is the default.

> +ACSCCID_CONF_OPTS = --enable-shared

Not needed, and potentially wrong. --{enable,disable}-{shared,static}
is automatically passed by the package infrastructure, depending on the
Buildroot configuration in terms of static/shared libraries.

> +ACSCCID_DEPENDENCIES = pcsc-lite libusb flex perl host-pkgconf

As indicated above, I believe the libusb dependency is optional, and
there is no flex and perl dependency, but instead just a host-flex
dependency.

So most likely, something like this:

ACSCCID_DEPENDENCIES = pcsc-lite host-flex host-pkgconf

ifeq ($(BR2_PACKAGE_LIBUSB),y)
ACSCCID_DEPENDENCIES += libusb
ACSCCID_CONF_OPTS += --enable-libusb
else
ACSCCID_CONF_OPTS += --disable-libusb
endif

Also, you forgot add the <pkg>_LICENSE and <pkg>_LICENSE_FILES
variables.

Could you rework your patch to take into account those comments, and
send an updated version ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-12-30 13:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30 11:33 [Buildroot] [PATCH 0/1] ACS CCID PC/SC Driver Juha Rantanen
2015-12-30 11:33 ` [Buildroot] [PATCH 1/1] ACS CCID PC/SC Driver added Juha Rantanen
2015-12-30 13:19   ` Thomas Petazzoni [this message]
2015-12-30 15:16   ` [Buildroot] [PATCH v2] " Juha Rantanen
2015-12-30 21:48     ` Arnout Vandecappelle
2015-12-30 22:20     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151230141927.24a250e4@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox