Edgar: switch to meson

...still not working with recent e, that changed the way modules are loaded
This commit is contained in:
Davide Andreoli 2020-04-21 11:49:02 +02:00
parent d0cb51f2ad
commit 53bdf254bd
111 changed files with 286 additions and 2790 deletions

60
.gitignore vendored
View File

@ -1,59 +1 @@
# Object files
*.o
*.ko
*.obj
*.elf
# Libraries
*.lib
*.a
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
*~
*.edj
*.pyc
/Makefile
/src/Makefile
/python/Makefile
Makefile.in
*.lo
config.h
config.h.in
configure
/compile
/config.cache
/config.guess
/config.log
/config.rpath
/config.status
/config.sub
aclocal.m4
autom4te.cache/
depcomp
install-sh
libtool
ltmain.sh
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
missing
module.desktop
src/.deps/
src/.libs/
src/module.la
stamp-h1
build/

View File

@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@ -1,36 +0,0 @@
# Simple Makefile for Enlightenment (edgar) gadgets
# gadget specific config
GADGET_NAME = audio
EXTRA_FILES =
# nothing should be changed below this point
GADGET_FILES = __init__.pyc $(GADGET_NAME).edj
prefix = $(shell pkg-config --variable=libdir enlightenment)
gadget_folder = ${prefix}/enlightenment/gadgets/$(GADGET_NAME)
.PHONY: all install clean
all: $(GADGET_FILES) $(EXTRA_FILES)
install: all
@mkdir -p -v ${gadget_folder}
@cp --preserve=mode -v $(GADGET_FILES) $(EXTRA_FILES) $(gadget_folder)
uninstall: all
@rm -rfv ${gadget_folder}
clean:
@rm -fv *.edj *.pyc
EDJE_CC = edje_cc
EDJE_FLAGS = -v -id images/ -fd fonts/
%.edj: %.edc images/*
$(EDJE_CC) $(EDJE_FLAGS) $<
@chmod -v og+r $@
%.pyc: %.py
python3 -c "from py_compile import compile; compile('$<', '$@')"

View File

@ -1,36 +0,0 @@
# Simple Makefile for Enlightenment (edgar) gadgets
# gadget specific config
GADGET_NAME = calculator
EXTRA_FILES =
# nothing should be changed below this point
GADGET_FILES = __init__.pyc $(GADGET_NAME).edj
prefix = $(shell pkg-config --variable=libdir enlightenment)
gadget_folder = ${prefix}/enlightenment/gadgets/$(GADGET_NAME)
.PHONY: all install clean
all: $(GADGET_FILES) $(EXTRA_FILES)
install: all
@mkdir -p -v ${gadget_folder}
@cp --preserve=mode -v $(GADGET_FILES) $(EXTRA_FILES) $(gadget_folder)
uninstall: all
@rm -rfv ${gadget_folder}
clean:
@rm -fv *.edj *.pyc
EDJE_CC = edje_cc
EDJE_FLAGS = -v -id images/ -fd fonts/
%.edj: %.edc images/*
$(EDJE_CC) $(EDJE_FLAGS) $<
@chmod -v og+r $@
%.pyc: %.py
python3 -c "from py_compile import compile; compile('$<', '$@')"

View File

@ -1,36 +0,0 @@
# Simple Makefile for Enlightenment (edgar) gadgets
# gadget specific config
GADGET_NAME = cpu
EXTRA_FILES =
# nothing should be changed below this point
GADGET_FILES = __init__.pyc $(GADGET_NAME).edj
prefix = $(shell pkg-config --variable=libdir enlightenment)
gadget_folder = ${prefix}/enlightenment/gadgets/$(GADGET_NAME)
.PHONY: all install clean
all: $(GADGET_FILES) $(EXTRA_FILES)
install: all
@mkdir -p -v ${gadget_folder}
@cp --preserve=mode -v $(GADGET_FILES) $(EXTRA_FILES) $(gadget_folder)
uninstall: all
@rm -rfv ${gadget_folder}
clean:
@rm -fv *.edj *.pyc
EDJE_CC = edje_cc
EDJE_FLAGS = -v -id images/ -fd fonts/
%.edj: %.edc images/*
$(EDJE_CC) $(EDJE_FLAGS) $<
@chmod -v og+r $@
%.pyc: %.py
python3 -c "from py_compile import compile; compile('$<', '$@')"

View File

@ -1,36 +0,0 @@
# Simple Makefile for Enlightenment (edgar) gadgets
# gadget specific config
GADGET_NAME = dropbox
EXTRA_FILES =
# nothing should be changed below this point
GADGET_FILES = __init__.pyc $(GADGET_NAME).edj
prefix = $(shell pkg-config --variable=libdir enlightenment)
gadget_folder = ${prefix}/enlightenment/gadgets/$(GADGET_NAME)
.PHONY: all install clean
all: $(GADGET_FILES) $(EXTRA_FILES)
install: all
@mkdir -p -v ${gadget_folder}
@cp --preserve=mode -v $(GADGET_FILES) $(EXTRA_FILES) $(gadget_folder)
uninstall: all
@rm -rfv ${gadget_folder}
clean:
@rm -fv *.edj *.pyc
EDJE_CC = edje_cc
EDJE_FLAGS = -v -id images/ -fd fonts/
%.edj: %.edc images/*
$(EDJE_CC) $(EDJE_FLAGS) $<
@chmod -v og+r $@
%.pyc: %.py
python3 -c "from py_compile import compile; compile('$<', '$@')"

View File

@ -1,36 +0,0 @@
# Simple Makefile for Enlightenment (edgar) gadgets
# gadget specific config
GADGET_NAME = led_clock
EXTRA_FILES =
# nothing should be changed below this point
GADGET_FILES = __init__.pyc $(GADGET_NAME).edj
prefix = $(shell pkg-config --variable=libdir enlightenment)
gadget_folder = ${prefix}/enlightenment/gadgets/$(GADGET_NAME)
.PHONY: all install clean
all: $(GADGET_FILES) $(EXTRA_FILES)
install: all
@mkdir -p -v ${gadget_folder}
@cp --preserve=mode -v $(GADGET_FILES) $(EXTRA_FILES) $(gadget_folder)
uninstall: all
@rm -rfv ${gadget_folder}
clean:
@rm -fv *.edj *.pyc
EDJE_CC = edje_cc
EDJE_FLAGS = -v -id images/ -fd fonts/
%.edj: %.edc images/*
$(EDJE_CC) $(EDJE_FLAGS) $<
@chmod -v og+r $@
%.pyc: %.py
python3 -c "from py_compile import compile; compile('$<', '$@')"

View File

@ -1,36 +0,0 @@
# Simple Makefile for Enlightenment (edgar) gadgets
# gadget specific config
GADGET_NAME = mem
EXTRA_FILES =
# nothing should be changed below this point
GADGET_FILES = __init__.pyc $(GADGET_NAME).edj
prefix = $(shell pkg-config --variable=libdir enlightenment)
gadget_folder = ${prefix}/enlightenment/gadgets/$(GADGET_NAME)
.PHONY: all install clean
all: $(GADGET_FILES) $(EXTRA_FILES)
install: all
@mkdir -p -v ${gadget_folder}
@cp --preserve=mode -v $(GADGET_FILES) $(EXTRA_FILES) $(gadget_folder)
uninstall: all
@rm -rfv ${gadget_folder}
clean:
@rm -fv *.edj *.pyc
EDJE_CC = edje_cc
EDJE_FLAGS = -v -id images/ -fd fonts/
%.edj: %.edc images/*
$(EDJE_CC) $(EDJE_FLAGS) $<
@chmod -v og+r $@
%.pyc: %.py
python3 -c "from py_compile import compile; compile('$<', '$@')"

View File

@ -1,36 +0,0 @@
# Simple Makefile for Enlightenment (edgar) gadgets
# gadget specific config
GADGET_NAME = netspeed
EXTRA_FILES =
# nothing should be changed below this point
GADGET_FILES = __init__.pyc $(GADGET_NAME).edj
prefix = $(shell pkg-config --variable=libdir enlightenment)
gadget_folder = ${prefix}/enlightenment/gadgets/$(GADGET_NAME)
.PHONY: all install clean
all: $(GADGET_FILES) $(EXTRA_FILES)
install: all
@mkdir -p -v ${gadget_folder}
@cp --preserve=mode -v $(GADGET_FILES) $(EXTRA_FILES) $(gadget_folder)
uninstall: all
@rm -rfv ${gadget_folder}
clean:
@rm -fv *.edj *.pyc
EDJE_CC = edje_cc
EDJE_FLAGS = -v -id images/ -fd fonts/
%.edj: %.edc images/*
$(EDJE_CC) $(EDJE_FLAGS) $<
@chmod -v og+r $@
%.pyc: %.py
python3 -c "from py_compile import compile; compile('$<', '$@')"

246
INSTALL
View File

@ -1,237 +1,23 @@
Installation Instructions
*************************
To build using meson
====================
meson build
cd build
ninja
ninja install
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
Or without chdir
================
meson build
ninja -C build
ninja -C build install
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Uninstall
=========
ninja -C build uninstall
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
Clean build
===========
rm -rf build/

View File

@ -1,25 +0,0 @@
ACLOCAL_AMFLAGS = -I m4
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
config.sub configure depcomp install-sh ltmain.sh \
missing module.desktop config.rpath mkinstalldirs
SUBDIRS = src python
EDJE_FLAGS = -v \
-id $(top_srcdir)
filesdir = $(datadir)
files_DATA = module.desktop e-module-edgar.edj
EXTRA_DIST = module.desktop.in \
module_icon.png \
e-module-edgar.edc
%.edj: %.edc
$(EDJE_CC) $(EDJE_FLAGS) $< $@
clean-local:
rm -rf e-module-edgar.edj module.desktop *~
uninstall:
rm -rf $(DESTDIR)$(datadir)

24
README
View File

@ -6,8 +6,8 @@ This module load python gadgets in Enlightenment.
Requirements
============
* Enlightenment >= 0.17
* Python >= 3.2 (also the -dev package if your disto need them)
* Enlightenment >= 0.24
* Python >= 3.5 (also the -dev package if your disto need them)
* Python-EFL >= 1.11 (built for python3)
* python3-dbus
@ -15,20 +15,11 @@ Requirements
Install
=======
To install the edgar module use the standard:
To install the edgar and all the incluede gadgets just use:
./autogen.sh
make
(sudo) make install
If py3 is not the default on your system you need to specify the version:
PYTHON_VERSION=3.x ./autogen.sh
Gadgets are in the GADGETS/ folder, to install them just use:
(sudo) make install
meson build
ninja -C build
ninja -C build install
The Audio gadget
@ -65,11 +56,10 @@ Usage tips:
How to write your own gadget
============================
I suggest to start from the ruler gadget, just copy it's folder and
I suggest to start from an existing gadget, just copy it's folder and
start hacking, a minimal gadget require:
base_folder/ (need to have the same name as the gadget)
Makefile (the provided makefile should work for you)
__init__.py (the gadget python script)
gadget.edc (the gadget edje file)
images/

View File

@ -1,16 +0,0 @@
#!/bin/sh
rm -rf autom4te.cache
rm -f aclocal.m4 ltmain.sh
touch README
echo "Running aclocal..." ; aclocal -I m4 $ACLOCAL_FLAGS || exit 1
echo "Running autoheader..." ; autoheader || exit 1
echo "Running autoconf..." ; autoconf || exit 1
echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
if [ -z "$NOCONFIGURE" ]; then
./configure "$@"
fi

View File

@ -1,84 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT(edgar, 0.2.0, dave@gurumeditation.it)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.ac)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
AM_INIT_AUTOMAKE(1.8)
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AC_C___ATTRIBUTE__
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
AC_PROG_LIBTOOL
#AM_GNU_GETTEXT([external])
#AM_GNU_GETTEXT_VERSION(0.14)
release=$(pkg-config --variable=release enlightenment)
MODULE_ARCH="$host_os-$host_cpu-$release"
AC_SUBST(MODULE_ARCH)
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
# Find edje_cc
PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0])
AC_ARG_WITH(edje-cc,
AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]),
[
v=$withval;
EDJE_CC=$v
],[
EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc
]
)
AC_SUBST(EDJE_CC)
AC_MSG_CHECKING([Which edje_cc to use])
AC_MSG_RESULT(${EDJE_CC})
# Check enlightenment version >=0.18
# (for e18 we manually define E_VERSION_MAJOR)
PKG_CHECK_MODULES(E,
[enlightenment >= 0.18 enlightenment < 0.19],
[AC_DEFINE([E_VERSION_MAJOR], [18], [Have exactly E18])],
[PKG_CHECK_MODULES(E, [enlightenment >= 0.19])]
)
# Explicit link to Eo
PKG_CHECK_MODULES(EO, [eo])
# Check for python3 and required modules
# PKG_CHECK_MODULES(PYTHON3, [python3 >= 3.2])
AX_PYTHON_DEVEL([>= '3.2'])
AC_SUBST([PYTHON])
AX_PYTHON3_MODULE(efl, "required")
AX_PYTHON3_MODULE(dbus, "required")
datadir=$(pkg-config --variable=modules enlightenment)/${PACKAGE}
AC_ARG_ENABLE(homedir-install,
AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]),
[ datadir="${HOME}/.e/e/modules/${PACKAGE}" ]
)
AC_OUTPUT([
Makefile
src/Makefile
python/Makefile
module.desktop
], [
])

View File

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 509 B

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

30
gadgets/audio/meson.build Normal file
View File

@ -0,0 +1,30 @@
gadget_name = 'audio'
install_dir = join_paths(gadgets_install_dir, gadget_name)
# build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
command : [edje_cc,
'-id', meson.current_source_dir() / 'images',
'-fd', meson.current_source_dir() / 'fonts',
'@INPUT@', '@OUTPUT@'],
install_dir: install_dir,
install : true
)
# TODO: bytecompile gadget __init__.py
# py3_bytecompile = [py3, '-c', 'from py_compile import compile; compile("@INPUT@", "@OUTPUT@")']
#custom_target('__init__.pyc',
# input : '__init__.py',
# output : '__init__.pyc',
# command : py3_bytecompile,
# install_dir: gadget_install_dir,
# install : true
# )
install_data('__init__.py', install_dir: install_dir)

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1,21 @@
gadget_name = 'calculator'
install_dir = join_paths(gadgets_install_dir, gadget_name)
# build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
command : [edje_cc,
'-id', meson.current_source_dir() / 'images',
'-fd', meson.current_source_dir() / 'fonts',
'@INPUT@', '@OUTPUT@'],
install_dir: install_dir,
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)

View File

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 664 B

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 284 B

View File

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 276 B

View File

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 284 B

21
gadgets/cpu/meson.build Normal file
View File

@ -0,0 +1,21 @@
gadget_name = 'cpu'
install_dir = join_paths(gadgets_install_dir, gadget_name)
# build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
command : [edje_cc,
'-id', meson.current_source_dir() / 'images',
'-fd', meson.current_source_dir() / 'fonts',
'@INPUT@', '@OUTPUT@'],
install_dir: install_dir,
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,21 @@
gadget_name = 'dropbox'
install_dir = join_paths(gadgets_install_dir, gadget_name)
# build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
command : [edje_cc,
'-id', meson.current_source_dir() / 'images',
'-fd', meson.current_source_dir() / 'fonts',
'@INPUT@', '@OUTPUT@'],
install_dir: install_dir,
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -0,0 +1,21 @@
gadget_name = 'led_clock'
install_dir = join_paths(gadgets_install_dir, gadget_name)
# build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
command : [edje_cc,
'-id', meson.current_source_dir() / 'images',
'-fd', meson.current_source_dir() / 'fonts',
'@INPUT@', '@OUTPUT@'],
install_dir: install_dir,
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)

View File

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 274 B

View File

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 286 B

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

21
gadgets/mem/meson.build Normal file
View File

@ -0,0 +1,21 @@
gadget_name = 'mem'
install_dir = join_paths(gadgets_install_dir, gadget_name)
# build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
command : [edje_cc,
'-id', meson.current_source_dir() / 'images',
'-fd', meson.current_source_dir() / 'fonts',
'@INPUT@', '@OUTPUT@'],
install_dir: install_dir,
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,21 @@
gadget_name = 'netspeed'
install_dir = join_paths(gadgets_install_dir, gadget_name)
# build gadget_name.edj
custom_target(gadget_name + '.edj',
input : gadget_name + '.edc',
output : gadget_name + '.edj',
command : [edje_cc,
'-id', meson.current_source_dir() / 'images',
'-fd', meson.current_source_dir() / 'fonts',
'@INPUT@', '@OUTPUT@'],
install_dir: install_dir,
install : true
)
# TODO: bytecompile gadget __init__.py
install_data('__init__.py', install_dir: install_dir)

View File

@ -1,14 +0,0 @@
AC_DEFUN([AC_C___ATTRIBUTE__],
[
AC_MSG_CHECKING(for __attribute__)
AC_CACHE_VAL(ac_cv___attribute__, [
AC_TRY_COMPILE([#include <stdlib.h>],
[int func(int x); int foo(int x __attribute__ ((unused))) { exit(1); }],
ac_cv___attribute__=yes, ac_cv___attribute__=no)])
if test "$ac_cv___attribute__" = "yes"; then
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [Define to 1 if your compiler has __attribute__])
fi
AC_MSG_RESULT($ac_cv___attribute__)
])

View File

@ -1,324 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_python_devel.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PYTHON_DEVEL([version])
#
# DESCRIPTION
#
# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
# in your configure.ac.
#
# This macro checks for Python and tries to get the include path to
# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS)
# output variables. It also exports $(PYTHON_EXTRA_LIBS) and
# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
#
# You can search for some particular version of Python by passing a
# parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
# note that you *have* to pass also an operator along with the version to
# match, and pay special attention to the single quotes surrounding the
# version number. Don't use "PYTHON_VERSION" for this: that environment
# variable is declared as precious and thus reserved for the end-user.
#
# This macro should work for all versions of Python >= 2.1.0. As an end
# user, you can disable the check for the python version by setting the
# PYTHON_NOVERSIONCHECK environment variable to something else than the
# empty string.
#
# If you need to use this macro for an older Python version, please
# contact the authors. We're always open for feedback.
#
# LICENSE
#
# Copyright (c) 2009 Sebastian Huber <sebastian-huber@web.de>
# Copyright (c) 2009 Alan W. Irwin
# Copyright (c) 2009 Rafael Laboissiere <rafael@laboissiere.net>
# Copyright (c) 2009 Andrew Collier
# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
# Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 17
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
AC_DEFUN([AX_PYTHON_DEVEL],[
#
# Allow the use of a (user set) custom python version
#
AC_ARG_VAR([PYTHON_VERSION],[The installed Python
version to use, for example '2.3'. This string
will be appended to the Python interpreter
canonical name.])
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
if test -z "$PYTHON"; then
AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
PYTHON_VERSION=""
fi
#
# Check for a version of Python >= 2.1.0
#
AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
ac_supports_python_ver=`$PYTHON -c "import sys; \
ver = sys.version.split ()[[0]]; \
print (ver >= '2.1.0')"`
if test "$ac_supports_python_ver" != "True"; then
if test -z "$PYTHON_NOVERSIONCHECK"; then
AC_MSG_RESULT([no])
AC_MSG_FAILURE([
This version of the AC@&t@_PYTHON_DEVEL macro
doesn't work properly with versions of Python before
2.1.0. You may need to re-run configure, setting the
variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
to something else than an empty string.
])
else
AC_MSG_RESULT([skip at user request])
fi
else
AC_MSG_RESULT([yes])
fi
#
# if the macro parameter ``version'' is set, honour it
#
if test -n "$1"; then
AC_MSG_CHECKING([for a version of Python $1])
ac_supports_python_ver=`$PYTHON -c "import sys; \
ver = sys.version.split ()[[0]]; \
print (ver $1)"`
if test "$ac_supports_python_ver" = "True"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([this package requires Python $1.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.
])
PYTHON_VERSION=""
fi
fi
#
# Check if you have distutils, else fail
#
AC_MSG_CHECKING([for the distutils Python package])
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
if test -z "$ac_distutils_result"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot import Python module "distutils".
Please check your Python installation. The error was:
$ac_distutils_result])
PYTHON_VERSION=""
fi
#
# Check for Python include path
#
AC_MSG_CHECKING([for Python include path])
if test -z "$PYTHON_CPPFLAGS"; then
python_path=`$PYTHON -c "import distutils.sysconfig; \
print (distutils.sysconfig.get_python_inc ());"`
plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
if test -n "${python_path}"; then
if test "${plat_python_path}" != "${python_path}"; then
python_path="-I$python_path -I$plat_python_path"
else
python_path="-I$python_path"
fi
fi
PYTHON_CPPFLAGS=$python_path
fi
AC_MSG_RESULT([$PYTHON_CPPFLAGS])
AC_SUBST([PYTHON_CPPFLAGS])
#
# Check for Python library path
#
AC_MSG_CHECKING([for Python library path])
if test -z "$PYTHON_LDFLAGS"; then
# (makes two attempts to ensure we've got a version number
# from the interpreter)
ac_python_version=`cat<<EOD | $PYTHON -
# join all versioning strings, on some systems
# major/minor numbers could be in different list elements
from distutils.sysconfig import *
e = get_config_var('VERSION')
if e is not None:
print(e)
EOD`
if test -z "$ac_python_version"; then
if test -n "$PYTHON_VERSION"; then
ac_python_version=$PYTHON_VERSION
else
ac_python_version=`$PYTHON -c "import sys; \
print (sys.version[[:3]])"`
fi
fi
# Make the versioning information available to the compiler
AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
[If available, contains the Python version number currently in use.])
# First, the library directory:
ac_python_libdir=`cat<<EOD | $PYTHON -
# There should be only one
import distutils.sysconfig
e = distutils.sysconfig.get_config_var('LIBDIR')
if e is not None:
print (e)
EOD`
# Now, for the library:
ac_python_library=`cat<<EOD | $PYTHON -
import distutils.sysconfig
c = distutils.sysconfig.get_config_vars()
if 'LDVERSION' in c:
print ('python'+c[['LDVERSION']])
else:
print ('python'+c[['VERSION']])
EOD`
# This small piece shamelessly adapted from PostgreSQL python macro;
# credits goes to momjian, I think. I'd like to put the right name
# in the credits, if someone can point me in the right direction... ?
#
if test -n "$ac_python_libdir" -a -n "$ac_python_library"
then
# use the official shared library
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
else
# old way: use libpython from python_configdir
ac_python_libdir=`$PYTHON -c \
"from distutils.sysconfig import get_python_lib as f; \
import os; \
print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
fi
if test -z "PYTHON_LDFLAGS"; then
AC_MSG_ERROR([
Cannot determine location of your Python DSO. Please check it was installed with
dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
])
fi
fi
AC_MSG_RESULT([$PYTHON_LDFLAGS])
AC_SUBST([PYTHON_LDFLAGS])
#
# Check for site packages
#
AC_MSG_CHECKING([for Python site-packages path])
if test -z "$PYTHON_SITE_PKG"; then
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
print (distutils.sysconfig.get_python_lib(0,0));"`
fi
AC_MSG_RESULT([$PYTHON_SITE_PKG])
AC_SUBST([PYTHON_SITE_PKG])
#
# libraries which must be linked in when embedding
#
AC_MSG_CHECKING(python extra libraries)
if test -z "$PYTHON_EXTRA_LIBS"; then
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
fi
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
AC_SUBST(PYTHON_EXTRA_LIBS)
#
# linking flags needed when embedding
#
AC_MSG_CHECKING(python extra linking flags)
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print (conf('LINKFORSHARED'))"`
fi
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
#
# final check to see if everything compiles alright
#
AC_MSG_CHECKING([consistency of all components of python development environment])
# save current global flags
ac_save_LIBS="$LIBS"
ac_save_CPPFLAGS="$CPPFLAGS"
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS"
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
AC_LANG_PUSH([C])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[#include <Python.h>]],
[[Py_Initialize();]])
],[pythonexists=yes],[pythonexists=no])
AC_LANG_POP([C])
# turn back to default flags
CPPFLAGS="$ac_save_CPPFLAGS"
LIBS="$ac_save_LIBS"
AC_MSG_RESULT([$pythonexists])
if test ! "x$pythonexists" = "xyes"; then
AC_MSG_FAILURE([
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
])
PYTHON_VERSION=""
fi
#
# all done!
#
])

View File

@ -1,50 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_python_module.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PYTHON3_MODULE(modname[, fatal])
#
# DESCRIPTION
#
# Checks for Python3 module.
#
# If fatal is non-empty then absence of a module will trigger an error.
#
# LICENSE
#
# Copyright (c) 2008 Andrew Collier
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 6
AU_ALIAS([AC_PYTHON3_MODULE], [AX_PYTHON3_MODULE])
AC_DEFUN([AX_PYTHON3_MODULE],[
# if test -z $PYTHON;
# then
# PYTHON="python"
# fi
PYTHON="python3"
PYTHON_NAME=`basename $PYTHON`
AC_MSG_CHECKING($PYTHON_NAME module: $1)
$PYTHON -c "import $1" 2>/dev/null
if test $? -eq 0;
then
AC_MSG_RESULT(yes)
eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
else
AC_MSG_RESULT(no)
eval AS_TR_CPP(HAVE_PYMOD_$1)=no
#
if test -n "$2"
then
AC_MSG_ERROR(failed to find required python3 module $1)
exit 1
fi
fi
])

72
meson.build Normal file
View File

@ -0,0 +1,72 @@
#### Project ####
project('edgar', 'c',
version: '0.4.0',
license: 'GPL v3',
meson_version: '>= 0.53.0')
# NOTE: meson 51 needed for the 'modules' param of pymod.find_installation()
# NOTE: meson 53 needed for the 'embed' param of py3.dependency()
#### Enlightenemnt ####
dep_e = dependency('enlightenment', version: '>= 0.23.99')
e_modules_dir = dep_e.get_pkgconfig_variable('modules')
e_lib_dir = dep_e.get_pkgconfig_variable('libdir')
e_release = dep_e.get_pkgconfig_variable('release')
e_module_arch = dep_e.get_pkgconfig_variable('module_arch')
#### Python3 ####
py3 = import('python').find_installation('python3', modules: ['efl', 'dbus'])
dep_py3 = py3.dependency(embed: true)
#### Install dirs ####
mod_install_dir = join_paths(e_modules_dir, meson.project_name())
lib_install_dir = join_paths(mod_install_dir, e_module_arch)
gadgets_install_dir = join_paths(e_lib_dir, 'enlightenment', 'edgar_gadgets')
#### Config.h ####
config_h = configuration_data()
config_h.set_quoted('PACKAGE', meson.project_name())
config_dir = include_directories('.')
#### Edje cc ####
edje_cc = find_program('edje_cc')
#### Edgar sources ####
subdir('src')
#### Gadgets ####
subdir('gadgets/audio')
subdir('gadgets/calculator')
subdir('gadgets/cpu')
subdir('gadgets/dropbox')
subdir('gadgets/led_clock')
subdir('gadgets/mem')
subdir('gadgets/netspeed')
#### Write config.h ####
configure_file(output: 'edgar_config.h', configuration: config_h)
#### Data files ####
install_data('python/e.py', install_dir: gadgets_install_dir)
install_data('module.desktop', install_dir: mod_install_dir)
cmd = [edje_cc,
'-id', meson.source_root(),
'@INPUT@', '@OUTPUT@']
custom_target('e-module-edgar.edj',
input : 'e-module-edgar.edc',
output : 'e-module-edgar.edj',
command : cmd,
install_dir: mod_install_dir,
install : true
)

Some files were not shown because too many files have changed in this diff Show More