Compare commits
590 commits
Author | SHA1 | Date | |
---|---|---|---|
|
d0cd9f198d | ||
|
e39a0a9212 | ||
|
074bb2166e | ||
|
1657a09a2d | ||
|
520ac45ca8 | ||
|
27133d6866 | ||
|
7ff17dd5a3 | ||
|
a83284d7bd | ||
|
5c64d6a6d3 | ||
|
9232d123e4 | ||
|
86f8d58ad0 | ||
|
f0755b41ef | ||
|
8d98c0501a | ||
|
bdfe75a5cd | ||
|
7d2337a17f | ||
|
f84cc525d6 | ||
|
2b8f946204 | ||
|
f3e4493e0b | ||
|
318af6607d | ||
|
2543a12a60 | ||
|
e5f16da2ec | ||
|
2f28404a93 | ||
|
bc8a2ff329 | ||
|
ed10cd0c39 | ||
|
e2cd2f2b3c | ||
|
f648f3766f | ||
|
556c80b16f | ||
|
bd048aabb8 | ||
|
cc6555e1d9 | ||
|
e6ff63036d | ||
|
5fe8c6140e | ||
|
e19f2e5c97 | ||
|
8b99eb30b7 | ||
|
506b35e97d | ||
|
f325fafa21 | ||
|
b4a4c1e4bf | ||
|
f4665c4ae4 | ||
|
c2fb968f02 | ||
|
dde94d75d1 | ||
|
49f5ad1706 | ||
|
765b738db7 | ||
|
51a5745910 | ||
|
b017b246df | ||
|
345cb4d509 | ||
|
5df3860f23 | ||
|
9faf1ea30c | ||
|
330f86da51 | ||
|
d2a404bf3c | ||
|
9b772a50db | ||
|
3e972a57c6 | ||
|
bb39456e41 | ||
|
de8dc83895 | ||
|
4b422023d7 | ||
|
942ad75e91 | ||
|
5db5399040 | ||
|
5837dfeb11 | ||
|
90075956d2 | ||
|
066f648fb1 | ||
|
a7ee240daa | ||
|
055ac44d0b | ||
|
15c041ac25 | ||
|
63037f9ae4 | ||
|
8fdd1db9d3 | ||
|
a529b679a3 | ||
|
0912175ec1 | ||
|
a387117a2a | ||
|
67a9f67cc4 | ||
|
13021781b4 | ||
|
d44b07c279 | ||
|
3c7b3d57dd | ||
|
ec14ed490a | ||
|
b4b69ca9c5 | ||
|
2930345a7b | ||
|
4273641178 | ||
|
b8a8d398de | ||
|
0897526541 | ||
|
48b402eb65 | ||
|
01e3a2fe18 | ||
|
eb71734dba | ||
|
9b44ecc86f | ||
|
11ed11780d | ||
|
db651ddd85 | ||
|
cdf268a8be | ||
|
3df25df858 | ||
|
eb0de8f114 | ||
|
481a8850ff | ||
|
0f854ba5fe | ||
|
852570e41e | ||
|
b4b62a17e7 | ||
|
e37a60ef3a | ||
|
7d5da97506 | ||
|
83dba23e0a | ||
|
b05cb4e4bd | ||
|
e6ea3339fe | ||
|
5228fe11d8 | ||
|
4001649ed5 | ||
|
88e4f98f2c | ||
|
030c7796ef | ||
|
aa224c9ae1 | ||
|
e02b4a7793 | ||
|
37b5a5761e | ||
|
da2c8cc672 | ||
|
b24f68ead8 | ||
|
0396883a08 | ||
|
1c9d3861d8 | ||
|
c544adacd4 | ||
|
c11b79a127 | ||
|
becd747c1a | ||
|
92fa2b3895 | ||
|
c465fdc5f8 | ||
|
86ff9a70f1 | ||
|
6f06eb2e70 | ||
|
374eea23e2 | ||
|
c2b892b145 | ||
|
61df1559b8 | ||
|
41a87a5ce5 | ||
|
3497b7239d | ||
|
fae7df9e66 | ||
|
f297f6e6c9 | ||
|
3656eb5464 | ||
|
f4fb3ca8be | ||
|
97c5e0f881 | ||
|
3d8da2bef4 | ||
|
9b20566068 | ||
|
614e088393 | ||
|
e4a06b3679 | ||
|
f5294296bf | ||
|
b839a8a398 | ||
|
96cfc0b597 | ||
|
93bc6b4141 | ||
|
2a1eddb5ae | ||
|
8dad744f51 | ||
|
b26a06f139 | ||
|
10239ddb25 | ||
|
d4fec80529 | ||
|
7b9e2e0208 | ||
|
fe0f06b627 | ||
|
72f1aa450c | ||
|
cb070e6182 | ||
|
639241d79d | ||
|
b9260db2fe | ||
|
adf193882d | ||
|
75db8c3422 | ||
|
fcf8f36e9b | ||
|
d23ac5b749 | ||
|
861881c635 | ||
|
c73482d074 | ||
|
f15b0ace72 | ||
|
356436f9bd | ||
|
c52b6f8a0e | ||
|
b5f471857b | ||
|
d1433a582c | ||
|
e71771676c | ||
|
bec3da9759 | ||
|
1792f0f6b9 | ||
|
9dfbb0bce3 | ||
|
b166e66556 | ||
|
592f849b5e | ||
|
2887c2c10f | ||
|
be2609dae1 | ||
|
befb3e65c1 | ||
|
3cb2cd7b5a | ||
|
1fd8ad1f6f | ||
|
7f2618d2d5 | ||
|
76b15db6c3 | ||
|
728f37ad15 | ||
|
61fad8538b | ||
|
259c96a1bc | ||
|
1a64129034 | ||
|
277cefd168 | ||
|
271e054ef9 | ||
|
5515c732ce | ||
|
75333c03bb | ||
|
7e15eb3cff | ||
|
44d8235d54 | ||
|
88ee2a03ef | ||
|
5fff381fe7 | ||
|
6a8f1965a9 | ||
|
9bf001d2c9 | ||
|
022d8a4dc2 | ||
|
8edde98c91 | ||
|
33380cf7e2 | ||
|
3e74e44c00 | ||
|
bec6d8fc8d | ||
|
b3139cf56c | ||
|
d0763a235f | ||
|
e245e2b824 | ||
|
e3e9f341e6 | ||
|
c6415452f5 | ||
|
ba76867c70 | ||
|
d346839750 | ||
|
9de3069a94 | ||
|
adfaa8e0af | ||
|
71aedf440b | ||
|
00685c2439 | ||
|
70594d1749 | ||
|
3e8130852f | ||
|
72140fc155 | ||
|
a23e3d0c3a | ||
|
25ef6b37f2 | ||
|
a9222671eb | ||
|
d8d457e52c | ||
|
2bdeefb514 | ||
|
c5dc486560 | ||
|
0e43c9c994 | ||
|
124ac892c6 | ||
|
190d5698c6 | ||
|
bf6eca1a5a | ||
|
f5fe26ec21 | ||
|
7ea2bf5899 | ||
|
01c323c293 | ||
|
47d41c531c | ||
|
da01e7e635 | ||
|
992130a11f | ||
|
ff5a1e4a83 | ||
|
f9e2ef0543 | ||
|
a315fd65a8 | ||
|
df9eb01b4d | ||
|
f59dbcfd7a | ||
|
d33b2c7ef9 | ||
|
bb1a9fb1fc | ||
|
73892f2f18 | ||
|
3b3df642e4 | ||
|
087fa999f1 | ||
|
d5d893c31f | ||
|
d89f201d66 | ||
|
73776792f7 | ||
|
3fe7b7b6e4 | ||
|
f43f01ea15 | ||
|
bf92a7b74d | ||
|
2f637babe8 | ||
|
6b5a320bed | ||
|
7e8a6ad18c | ||
|
72d2cfe064 | ||
|
ffae0de40c | ||
|
dd2c7136d3 | ||
|
f178723927 | ||
|
3164b99f2f | ||
|
d45a8bb443 | ||
|
2c7e41efeb | ||
|
da4115d276 | ||
|
0f34254995 | ||
|
bb5f4f6d29 | ||
|
9aa63712b3 | ||
|
a105a0ce53 | ||
|
21fe2da3a6 | ||
|
632c7899f7 | ||
|
869a5943c0 | ||
|
c3ed91a734 | ||
|
bc9a027a9e | ||
|
beb295fad0 | ||
|
4044c55847 | ||
|
289549a6e1 | ||
|
3587540ea5 | ||
|
19c5dcf528 | ||
|
cc469ae468 | ||
|
e4bfdb144e | ||
|
a938fb267a | ||
|
081f255ac3 | ||
|
3c129346a2 | ||
|
8246c8d9b8 | ||
|
aa2a72e459 | ||
|
fa48db20f7 | ||
|
637ea2abea | ||
|
1e0d97f0d8 | ||
|
b6c9f34a47 | ||
|
183e5a5e34 | ||
|
2f36f666e5 | ||
|
1adba81824 | ||
|
9622fe984b | ||
|
185f5ba9e5 | ||
|
22fd12922e | ||
|
0668c0c861 | ||
|
770b0d6113 | ||
|
0bc0190b59 | ||
|
b28b3ff56a | ||
|
560cb220d2 | ||
|
bb23089e84 | ||
|
18d121b854 | ||
|
41dcf83e53 | ||
|
97a33d77ef | ||
|
6ff7317492 | ||
|
472f8c826e | ||
|
400d01d37f | ||
|
6052829a43 | ||
|
dbe561d856 | ||
|
fc7fc89ee7 | ||
|
18d05777af | ||
|
5dda75f84c | ||
|
d9c2951b19 | ||
|
d5999694c1 | ||
|
6128fa0f3d | ||
|
752590d266 | ||
|
04d79438d2 | ||
|
6650c96833 | ||
|
624f2a8967 | ||
|
375f617245 | ||
|
f6ee970394 | ||
|
25de619b04 | ||
|
4a3331c47a | ||
|
a712cfd4e6 | ||
|
594e6a4916 | ||
|
b4a34de7d8 | ||
|
163252fcec | ||
|
57ba3be8e0 | ||
|
57c660e98d | ||
|
7bc5cdcee3 | ||
|
23fbc85322 | ||
|
aa49d8967b | ||
|
19e3ebc68e | ||
|
b8c9bc0200 | ||
|
304fefb3fa | ||
|
29fdf3e483 | ||
|
08d8c7f60b | ||
|
36ea23dce8 | ||
|
766cfcc77f | ||
|
41f541bd26 | ||
|
0df349f8df | ||
|
196b622bd6 | ||
|
1cbcdf7f9e | ||
|
9bbdad4ed7 | ||
|
6cba0bf545 | ||
|
559df398ff | ||
|
f0a0448857 | ||
|
f04165e4e0 | ||
|
83ad5a9233 | ||
|
a057c03002 | ||
|
1cf7b5ae05 | ||
|
3ee2e24082 | ||
|
d00825894a | ||
|
c4ca3f0bf2 | ||
|
a28067d30d | ||
|
7b2c37067b | ||
|
7e6939bdc0 | ||
|
35188c0f9d | ||
|
ae9a33f00d | ||
|
87d696053e | ||
|
fa5e832d77 | ||
|
747c5e42f1 | ||
|
107b83e1de | ||
|
74729bc10d | ||
|
59f0d5607b | ||
|
fe541acd8a | ||
|
c3d29513cb | ||
|
c1017ac247 | ||
|
9d22009696 | ||
|
46356c7f39 | ||
|
95383f479a | ||
|
94c43deb9f | ||
|
6252504514 | ||
|
ddb59c4f72 | ||
|
3e0e8c3863 | ||
|
b703519216 | ||
|
4185ad9e49 | ||
|
819a8085cd | ||
|
b1178b7591 | ||
|
c19bf27d8d | ||
|
a7cd2d9438 | ||
|
7f24f26e13 | ||
|
9966c162ce | ||
|
70471762cc | ||
|
23fabf774e | ||
|
ee0bb7b9df | ||
|
8a70ddefc7 | ||
|
f8a70fc188 | ||
|
6f8928afbc | ||
|
375b9aeee4 | ||
|
ffd3b199e1 | ||
|
f690a75422 | ||
|
25a4a2f15d | ||
|
fbef79fd9f | ||
|
3740ab89eb | ||
|
5d079de65a | ||
|
c86d2d5ecb | ||
|
56e6a67621 | ||
|
a0baae412c | ||
|
02d684636a | ||
|
8133570a9c | ||
|
0c2c46417d | ||
|
323a2d1da0 | ||
|
c1f12cc650 | ||
|
0e3e7ca91b | ||
|
40ba683222 | ||
|
4ab5dc95a6 | ||
|
224ead0d5b | ||
|
d88a1494fd | ||
|
d313c7b182 | ||
|
e3d82916ad | ||
|
4fb1eda08e | ||
|
756a24c3d4 | ||
|
61d0f260f3 | ||
|
9f3881f1f3 | ||
|
fc2152034c | ||
|
9d042c3564 | ||
|
7f3ef93466 | ||
|
6d892fb2fa | ||
|
eb1254a3a0 | ||
|
085fdc9c3c | ||
|
3831a680ab | ||
|
2a1409b927 | ||
|
77e4444a27 | ||
|
5fd21e2305 | ||
|
b86ffea908 | ||
|
4c75da6e28 | ||
|
41a5ec56fe | ||
|
088c1a12be | ||
|
57ec0c99a5 | ||
|
b2869e2a22 | ||
|
6e1a70ad6c | ||
|
9cadde2183 | ||
|
ad00330865 | ||
|
12b1f4fab8 | ||
|
9f63667c06 | ||
|
2bcaf5fc70 | ||
|
e7c01b17df | ||
|
8a0cba2010 | ||
|
d06a94bfe6 | ||
|
5f24380c03 | ||
|
fd2374e5ff | ||
|
dadc4008ed | ||
|
9ea5f365f6 | ||
|
4b1cf93c0e | ||
|
9b2d4f8d83 | ||
|
f387d3cc81 | ||
|
997c932e62 | ||
|
29d1085028 | ||
|
046f800efb | ||
|
19cf8c6105 | ||
|
1deb958e37 | ||
|
da180706b6 | ||
|
69ad693a37 | ||
|
e51b71ad78 | ||
|
cad6bb8ee0 | ||
|
985d5c3234 | ||
|
241a8ad346 | ||
|
7f6a237d7d | ||
|
c773d4ad91 | ||
|
52bf9d5efc | ||
|
9af392d629 | ||
|
42f2974f3c | ||
|
877e9fb00d | ||
|
5ff1b7ad51 | ||
|
cb5b508b46 | ||
|
37f1c3f66f | ||
|
1a78a488b7 | ||
|
250b11a475 | ||
|
ffda9cc9c7 | ||
|
4e3085cd05 | ||
|
f5c70eaa5a | ||
|
b721a1d8cc | ||
|
114b6ce270 | ||
|
0b1509c9e3 | ||
|
d32e986ef6 | ||
|
e778bd4998 | ||
|
47a400aaa7 | ||
|
ef9e4d0eb2 | ||
|
ee8052d459 | ||
|
de1b14830d | ||
|
da6d7b57f5 | ||
|
441da09158 | ||
|
a6d950b739 | ||
|
02c147374b | ||
|
df3c5de2f7 | ||
|
01717c05a0 | ||
|
a7d66cec4c | ||
|
b51c61cf55 | ||
|
74a1d01651 | ||
|
1ee31bdfd2 | ||
|
aa75904c0b | ||
|
e96cf8db91 | ||
|
5cc2d45535 | ||
|
1e2bf20acf | ||
|
da756e239f | ||
|
805c6e6924 | ||
|
75f978879e | ||
|
bcedf17632 | ||
|
f91e8f04a1 | ||
|
5006684e43 | ||
|
3a02d9e19a | ||
|
c05dce1890 | ||
|
64c458ba8c | ||
|
bc424ae857 | ||
|
14bf39979c | ||
|
c293247428 | ||
|
876ee51cc8 | ||
|
e9a7e58ba3 | ||
|
478903aea1 | ||
|
30e02086c5 | ||
|
05fe796a8b | ||
|
9a532691dd | ||
|
1f9238ed3f | ||
|
499aef158d | ||
|
7a23a00c45 | ||
|
c94254f697 | ||
|
d8ceff5cba | ||
|
b0f4c0ed6f | ||
|
a1a5a3fe5f | ||
|
3387e2715f | ||
|
551f39d4fd | ||
|
f505a27607 | ||
|
62037ba35f | ||
|
2150ffa21f | ||
|
b75488123b | ||
|
51f194e91f | ||
|
181b13f834 | ||
|
45ba9f112a | ||
|
fa7ed79149 | ||
|
ce2b260ca5 | ||
|
7551321fab | ||
|
814f65cfb9 | ||
|
d74b836a35 | ||
|
0716433f2e | ||
|
8cb6f4c09e | ||
|
4dd617c9af | ||
|
641ee7ce44 | ||
|
90914f8054 | ||
|
c555cb924f | ||
|
afc558eb7d | ||
|
4a44bd069e | ||
|
a93c172c71 | ||
|
50b79a9e86 | ||
|
d28ab39ffa | ||
|
f4e47a668d | ||
|
1dc27c47f4 | ||
|
ede101a5c2 | ||
|
2bff28cf8f | ||
|
2e394971cb | ||
|
4bdb4c7d8b | ||
|
ed8272ad80 | ||
|
f0e68f2beb | ||
|
5f9e4b7830 | ||
|
a819f2c165 | ||
|
0341970545 | ||
|
30908edc95 | ||
|
f109732f56 | ||
|
535e9ef92c | ||
|
e56c31a78e | ||
|
430408c0b2 | ||
|
4c4c2dbdae | ||
|
4267ae50f4 | ||
|
20a7734215 | ||
|
2cd58bca38 | ||
|
6b8276a000 | ||
|
bb9e1ed2c0 | ||
|
541193dd39 | ||
|
f138a1ca3c | ||
|
4ae1631f2a | ||
|
c7b9381de5 | ||
|
7b8fd78406 | ||
|
761c15286f | ||
|
7594df416e | ||
|
ac7044ae08 | ||
|
a1e9270f77 | ||
|
e0fd1fada4 | ||
|
f7fc4e1ac5 | ||
|
a696764d9c | ||
|
6f36722c73 | ||
|
26b4ffca23 | ||
|
73284144f3 | ||
|
485bb55197 | ||
|
e08003851f | ||
|
f232eea959 | ||
|
2172a9875f | ||
|
8571c01945 | ||
|
3558865a6e | ||
|
ff0037ac69 | ||
|
e4fe3cd093 | ||
|
e02c7e81d0 | ||
|
8c7d4c4713 | ||
|
5bf0fd165e | ||
|
914beae80e | ||
|
5ed3339b07 | ||
|
359721a21c | ||
|
3843e8459a | ||
|
1d285067a6 | ||
|
dcaa438f41 | ||
|
7d72d8b170 | ||
|
8c1e0d4bfd | ||
|
76baa032e8 | ||
|
92c6504a27 | ||
|
89f54efb57 | ||
|
28167ad7eb | ||
|
a01eb81082 | ||
|
f46542cb83 | ||
|
2019612ec5 | ||
|
e53068dda8 | ||
|
eb97e6fc0f | ||
|
325c643c92 | ||
|
fa9ffdfb41 | ||
|
9d06518ca4 |
454 changed files with 21335 additions and 11854 deletions
|
@ -2,8 +2,9 @@
|
||||||
(See <http://wiki.openwrt.org/doc/devel/packages> for overall format and construction)
|
(See <http://wiki.openwrt.org/doc/devel/packages> for overall format and construction)
|
||||||
|
|
||||||
|
|
||||||
All packages you commit or submit by pull-request should follow these simple guidelines:
|
### Basic guidelines
|
||||||
|
|
||||||
|
All packages you commit or submit by pull-request should follow these simple guidelines:
|
||||||
* Package a version which is still maintained by the upstream author.
|
* Package a version which is still maintained by the upstream author.
|
||||||
* Will be updated regularly to maintained and supported versions.
|
* Will be updated regularly to maintained and supported versions.
|
||||||
* Have no dependencies outside the OpenWrt core packages or this repository feed.
|
* Have no dependencies outside the OpenWrt core packages or this repository feed.
|
||||||
|
@ -11,7 +12,7 @@ All packages you commit or submit by pull-request should follow these simple gui
|
||||||
* Do NOT use a rolling source file (e.g. foo-latest.tar.gz) or the head of a branch as source for the package since that would create unpredictable builds which change over time.
|
* Do NOT use a rolling source file (e.g. foo-latest.tar.gz) or the head of a branch as source for the package since that would create unpredictable builds which change over time.
|
||||||
* Best of all -- it works as expected!
|
* Best of all -- it works as expected!
|
||||||
|
|
||||||
Makefile contents should contain:
|
#### Makefile contents should contain:
|
||||||
|
|
||||||
* An up-to-date copyright notice. Use OpenWrt if no other present or supply your own.
|
* An up-to-date copyright notice. Use OpenWrt if no other present or supply your own.
|
||||||
* A (PKG_)MAINTAINER definition listing either yourself or another person in the field.
|
* A (PKG_)MAINTAINER definition listing either yourself or another person in the field.
|
||||||
|
@ -22,27 +23,47 @@ Makefile contents should contain:
|
||||||
(E.g.: PKG_LICENSE_FILES:=COPYING)
|
(E.g.: PKG_LICENSE_FILES:=COPYING)
|
||||||
* PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE.
|
* PKG_RELEASE should be initially set to 1 or reset to 1 if the software version is changed. You should increment it if the package itself has changed. For example, modifying a support script, changing configure options like --disable* or --enable* switches, or if you changed something in the package which causes the resulting binaries to be different. Changes like correcting md5sums, changing mirror URLs, adding a maintainer field or updating a comment or copyright year in a Makefile do not require a change to PKG_RELEASE.
|
||||||
|
|
||||||
Commits in your pull-requests should:
|
#### Commits in your pull-requests should:
|
||||||
|
|
||||||
* Have a useful description prefixed with the package name
|
* Have a useful description prefixed with the package name
|
||||||
(E.g.: "foopkg: Add libzot dependency")
|
(E.g.: "foopkg: Add libzot dependency")
|
||||||
* Include Signed-off-by in the comment
|
* Include Signed-off-by in the comment
|
||||||
(See <https://dev.openwrt.org/wiki/SubmittingPatches#a10.Signyourwork>)
|
(See <https://dev.openwrt.org/wiki/SubmittingPatches#a10.Signyourwork>)
|
||||||
|
|
||||||
If you have commit access:
|
### Advice on pull requests:
|
||||||
|
|
||||||
|
Pull requests are the easiest way to contribute changes to git repos at Github. They are the preferred contribution method, as they offer a nice way for commenting and amending the proposed changes.
|
||||||
|
|
||||||
|
* You need a local "fork" of the Github repo.
|
||||||
|
* Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request. Workflow using "feature_x" as the example:
|
||||||
|
- Update your local git fork to the tip (of the master, usually)
|
||||||
|
- Create the feature branch with `git checkout -b feature_x`
|
||||||
|
- Edit changes and commit them locally
|
||||||
|
- Push them to your Github fork by `git push -u origin feature_x`. That creates the "feature_x" branch at your Github fork and sets it as the remote of this branch
|
||||||
|
- When you now visit Github, you should see a proposal to create a pull request
|
||||||
|
|
||||||
|
* If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then use `git push` to automatically update the pull request.
|
||||||
|
|
||||||
|
* If you need to change something in the existing pull request (e.g. to add a missing signed-off-by line to the commit message), you can use `git push -f` to overwrite the original commits. That is easy and safe when using a feature branch. Example workflow:
|
||||||
|
- Checkout the feature branch by `git checkout feature_x`
|
||||||
|
- Edit changes and commit them locally. If you are just updating the commit message in the last commit, you can use `git commit --amend` to do that
|
||||||
|
- If you added several new commits or made other changes that require cleaning up, you can use `git rebase -i HEAD~X` (X = number of commits to edit) to possibly squash some commits
|
||||||
|
- Push the changed commits to Github with `git push -f` to overwrite the original commits in the "feature_x" branch with the new ones. The pull request gets automatically updated
|
||||||
|
|
||||||
|
### If you have commit access:
|
||||||
|
|
||||||
* Do NOT use git push --force.
|
* Do NOT use git push --force.
|
||||||
* Do NOT commit to other maintainer's packages without their consent.
|
* Do NOT commit to other maintainer's packages without their consent.
|
||||||
* Use Pull Requests if you are unsure and to suggest changes to other maintainers.
|
* Use Pull Requests if you are unsure and to suggest changes to other maintainers.
|
||||||
|
|
||||||
Gaining commit access:
|
#### Gaining commit access:
|
||||||
|
|
||||||
* We will gladly grant commit access to responsible contributors who have made
|
* We will gladly grant commit access to responsible contributors who have made
|
||||||
useful pull requests and / or feedback or patches to this repository or
|
useful pull requests and / or feedback or patches to this repository or
|
||||||
OpenWrt in general. Please include your request for commit access in your
|
OpenWrt in general. Please include your request for commit access in your
|
||||||
next pull request or ticket.
|
next pull request or ticket.
|
||||||
|
|
||||||
Release Branches:
|
### Release Branches:
|
||||||
|
|
||||||
* Branches named "for-XX.YY" (e.g. for-14.07) are release branches.
|
* Branches named "for-XX.YY" (e.g. for-14.07) are release branches.
|
||||||
* These branches are built with the respective OpenWrt release and are created
|
* These branches are built with the respective OpenWrt release and are created
|
||||||
|
@ -51,9 +72,8 @@ Release Branches:
|
||||||
* Do NOT add new packages and do NOT do major upgrades of packages here.
|
* Do NOT add new packages and do NOT do major upgrades of packages here.
|
||||||
* If you are unsure if your change is suitable, please use a pull request.
|
* If you are unsure if your change is suitable, please use a pull request.
|
||||||
|
|
||||||
####Common LICENSE tags (short list)
|
### Common LICENSE tags (short list)
|
||||||
(Complete list can be found at: <http://spdx.org/licenses>)
|
(Complete list can be found at: <http://spdx.org/licenses>)
|
||||||
####
|
|
||||||
|
|
||||||
| Full Name | Identifier |
|
| Full Name | Identifier |
|
||||||
|---|:---|
|
|---|:---|
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=monit
|
PKG_NAME:=monit
|
||||||
PKG_VERSION:=5.12.2
|
PKG_VERSION:=5.14
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://mmonit.com/monit/dist
|
PKG_SOURCE_URL:=http://mmonit.com/monit/dist
|
||||||
PKG_MD5SUM:=5f5cf4c18b42e8091b49b4e07cf972ce
|
PKG_MD5SUM:=1b3ae1eb08a0914402a8764e5689c1c5
|
||||||
|
|
||||||
PKG_LICENSE:=AGPL-3.0
|
PKG_LICENSE:=AGPL-3.0
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -13821,14 +13821,7 @@ fi
|
@@ -13849,14 +13849,7 @@ fi
|
||||||
# Find the right directory to put the root-mode PID file in
|
# Find the right directory to put the root-mode PID file in
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5
|
||||||
$as_echo_n "checking pid file location... " >&6; }
|
$as_echo_n "checking pid file location... " >&6; }
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=sudo
|
PKG_NAME:=sudo
|
||||||
PKG_VERSION:=1.8.13
|
PKG_VERSION:=1.8.14p3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_LICENSE:=ISC
|
PKG_LICENSE:=ISC
|
||||||
PKG_LICENSE_FILES:=doc/LICENSE
|
PKG_LICENSE_FILES:=doc/LICENSE
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.sudo.ws/sudo/dist
|
PKG_SOURCE_URL:=http://www.sudo.ws/dist
|
||||||
PKG_MD5SUM:=f61577ec330ad1bd504c0e2eec6ea2d8
|
PKG_MD5SUM:=93dbd1e47c136179ff1b01494c1c0e75
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ endef
|
||||||
|
|
||||||
define Package/sudo/conffiles
|
define Package/sudo/conffiles
|
||||||
/etc/sudoers
|
/etc/sudoers
|
||||||
|
/etc/sudoers.d/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
|
|
12
admin/sudo/patches/030-musl-fix-missing-header.patch
Normal file
12
admin/sudo/patches/030-musl-fix-missing-header.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff -rupN sudo-1.8.14p3.orig/include/sudo_util.h sudo-1.8.14p3/include/sudo_util.h
|
||||||
|
--- sudo-1.8.14p3.orig/include/sudo_util.h 2015-07-22 14:22:49.000000000 +0200
|
||||||
|
+++ sudo-1.8.14p3/include/sudo_util.h 2015-08-30 18:41:24.509814946 +0200
|
||||||
|
@@ -23,6 +23,8 @@
|
||||||
|
# include "compat/stdbool.h"
|
||||||
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Macros for operating on struct timeval.
|
||||||
|
*/
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2014 OpenWrt.org
|
# Copyright (C) 2006-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=zabbix
|
PKG_NAME:=zabbix
|
||||||
PKG_VERSION:=2.4.4
|
PKG_VERSION:=2.4.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@SF/zabbix
|
PKG_SOURCE_URL:=@SF/zabbix
|
||||||
PKG_MD5SUM:=400a3e2ebec80e2f1fe86d1b32bfd2e1
|
PKG_MD5SUM:=06ad8d5808a0eddf2b9f0a256b6a5fde
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
@ -33,6 +33,7 @@ define Package/zabbix/Default
|
||||||
SUBMENU:=zabbix
|
SUBMENU:=zabbix
|
||||||
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
||||||
USERID:=zabbix=53:zabbix=53
|
USERID:=zabbix=53:zabbix=53
|
||||||
|
DEPENDS += $(ICONV_DEPENDS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/zabbix-agent
|
define Package/zabbix-agent
|
||||||
|
@ -48,19 +49,19 @@ endef
|
||||||
define Package/zabbix-extra-mac80211
|
define Package/zabbix-extra-mac80211
|
||||||
$(call Package/zabbix/Default)
|
$(call Package/zabbix/Default)
|
||||||
TITLE+= discovery/userparameters for mac80211
|
TITLE+= discovery/userparameters for mac80211
|
||||||
DEPENDS += +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
|
DEPENDS = +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/zabbix-extra-network
|
define Package/zabbix-extra-network
|
||||||
$(call Package/zabbix/Default)
|
$(call Package/zabbix/Default)
|
||||||
TITLE+= discovery/userparameters for network
|
TITLE+= discovery/userparameters for network
|
||||||
DEPENDS += +zabbix-agentd +libuci-lua +lua
|
DEPENDS = +zabbix-agentd +libuci-lua +lua
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/zabbix-extra-wifi
|
define Package/zabbix-extra-wifi
|
||||||
$(call Package/zabbix/Default)
|
$(call Package/zabbix/Default)
|
||||||
TITLE+= discovery/userparameters for wifi
|
TITLE+= discovery/userparameters for wifi
|
||||||
DEPENDS += +zabbix-agentd +libiwinfo-lua +libuci-lua +lua
|
DEPENDS = +zabbix-agentd +libiwinfo-lua +libuci-lua +lua
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/zabbix-sender
|
define Package/zabbix-sender
|
||||||
|
@ -107,6 +108,7 @@ CONFIGURE_ARGS+= \
|
||||||
--enable-agent \
|
--enable-agent \
|
||||||
--enable-server \
|
--enable-server \
|
||||||
--enable-proxy \
|
--enable-proxy \
|
||||||
|
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
|
||||||
--disable-java \
|
--disable-java \
|
||||||
--with-sqlite3="$(STAGING_DIR)/usr"
|
--with-sqlite3="$(STAGING_DIR)/usr"
|
||||||
|
|
||||||
|
|
22
admin/zabbix/files/zabbix_agentd.init
Normal file → Executable file
22
admin/zabbix/files/zabbix_agentd.init
Normal file → Executable file
|
@ -3,29 +3,19 @@
|
||||||
|
|
||||||
START=60
|
START=60
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
PROG=/usr/sbin/zabbix_agentd
|
PROG=/usr/sbin/zabbix_agentd
|
||||||
CONFIG=/etc/zabbix_agentd.conf
|
CONFIG=/etc/zabbix_agentd.conf
|
||||||
SERVICE_PID_FILE=/var/run/zabbix_agentd.pid
|
|
||||||
|
|
||||||
start() {
|
start_service() {
|
||||||
# Sometimes the agentd config was installed in /etc/zabbix/zabbix_agentd.conf
|
# Sometimes the agentd config was installed in /etc/zabbix/zabbix_agentd.conf
|
||||||
[ -f /etc/zabbix/zabbix_agentd.conf ] && mv /etc/zabbix/zabbix_agentd.conf ${CONFIG}
|
[ -f /etc/zabbix/zabbix_agentd.conf ] && mv /etc/zabbix/zabbix_agentd.conf ${CONFIG}
|
||||||
|
|
||||||
[ -f ${CONFIG} ] || return 1
|
[ -f ${CONFIG} ] || return 1
|
||||||
|
|
||||||
grep -q "^PidFile=${SERVICE_PID_FILE}" ${CONFIG} || {
|
procd_open_instance
|
||||||
logger -s -t ${CONFIG} -p daemon.error "Only \"PidFile=${SERVICE_PID_FILE}\" supported"
|
procd_set_param command ${PROG} -c ${CONFIG} -f
|
||||||
return 1
|
procd_set_param respawn
|
||||||
}
|
procd_close_instance
|
||||||
|
|
||||||
grep -q "^AllowRoot=1" ${CONFIG} || {
|
|
||||||
touch ${SERVICE_PID_FILE}
|
|
||||||
chown zabbix:zabbix ${SERVICE_PID_FILE}
|
|
||||||
}
|
|
||||||
|
|
||||||
service_start ${PROG} -c ${CONFIG}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
|
||||||
service_stop ${PROG}
|
|
||||||
}
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
-# Mandatory: no
|
-# Mandatory: no
|
||||||
-# Default:
|
-# Default:
|
||||||
-# PidFile=/tmp/zabbix_agentd.pid
|
-# PidFile=/tmp/zabbix_agentd.pid
|
||||||
+# Only /var/run/zabbix_agentd.pid supported
|
+# We do not need PidFile with procd
|
||||||
+PidFile=/var/run/zabbix_agentd.pid
|
+# PidFile=/var/run/zabbix_agentd.pid
|
||||||
|
|
||||||
### Option: LogFile
|
### Option: LogFile
|
||||||
# Name of log file.
|
# Name of log file.
|
||||||
|
|
243
admin/zabbix/patches/015-daemon-foreground.patch
Normal file
243
admin/zabbix/patches/015-daemon-foreground.patch
Normal file
|
@ -0,0 +1,243 @@
|
||||||
|
--- a/include/common.h
|
||||||
|
+++ b/include/common.h
|
||||||
|
@@ -1083,4 +1083,7 @@ int parse_serveractive_element(char *str
|
||||||
|
|
||||||
|
char *zbx_dyn_escape_shell_single_quote(const char *text);
|
||||||
|
|
||||||
|
+#define ZBX_RUN_BACKGROUND 0
|
||||||
|
+#define ZBX_RUN_FOREGROUND 1
|
||||||
|
+
|
||||||
|
#endif
|
||||||
|
--- a/include/daemon.h
|
||||||
|
+++ b/include/daemon.h
|
||||||
|
@@ -28,7 +28,7 @@ extern char *CONFIG_PID_FILE;
|
||||||
|
|
||||||
|
#include "threads.h"
|
||||||
|
|
||||||
|
-int daemon_start(int allow_root, const char *user);
|
||||||
|
+int daemon_start(int allow_root, const char *user, int run_foreground);
|
||||||
|
void daemon_stop();
|
||||||
|
|
||||||
|
int zbx_sigusr_send(int flags);
|
||||||
|
@@ -36,6 +36,6 @@ int zbx_sigusr_send(int flags);
|
||||||
|
#define ZBX_IS_RUNNING() 1
|
||||||
|
#define ZBX_DO_EXIT()
|
||||||
|
|
||||||
|
-#define START_MAIN_ZABBIX_ENTRY(a, u) daemon_start(a, u)
|
||||||
|
+#define START_MAIN_ZABBIX_ENTRY(a, u, f) daemon_start(a, u, f)
|
||||||
|
|
||||||
|
#endif /* ZABBIX_DAEMON_H */
|
||||||
|
--- a/src/libs/zbxnix/daemon.c
|
||||||
|
+++ b/src/libs/zbxnix/daemon.c
|
||||||
|
@@ -272,16 +272,17 @@ static void set_daemon_signal_handlers()
|
||||||
|
* *
|
||||||
|
* Purpose: init process as daemon *
|
||||||
|
* *
|
||||||
|
- * Parameters: allow_root - allow root permission for application *
|
||||||
|
- * user - user on the system to which to drop the *
|
||||||
|
- * privileges *
|
||||||
|
+ * Parameters: allow_root - allow root permission for application *
|
||||||
|
+ * user - user on the system to which to drop the *
|
||||||
|
+ * privileges *
|
||||||
|
+ * run_foreground - should it close its controling tty *
|
||||||
|
* *
|
||||||
|
* Author: Alexei Vladishev *
|
||||||
|
* *
|
||||||
|
* Comments: it doesn't allow running under 'root' if allow_root is zero *
|
||||||
|
* *
|
||||||
|
******************************************************************************/
|
||||||
|
-int daemon_start(int allow_root, const char *user)
|
||||||
|
+int daemon_start(int allow_root, const char *user, int run_foreground)
|
||||||
|
{
|
||||||
|
pid_t pid;
|
||||||
|
struct passwd *pwd;
|
||||||
|
@@ -336,15 +337,22 @@ int daemon_start(int allow_root, const c
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (0 != (pid = zbx_fork()))
|
||||||
|
- exit(EXIT_SUCCESS);
|
||||||
|
+ if ( ZBX_RUN_FOREGROUND != run_foreground)
|
||||||
|
+ if (0 != (pid = zbx_fork()))
|
||||||
|
+ exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
|
setsid();
|
||||||
|
|
||||||
|
signal(SIGHUP, SIG_IGN);
|
||||||
|
|
||||||
|
- if (0 != (pid = zbx_fork()))
|
||||||
|
- exit(EXIT_SUCCESS);
|
||||||
|
+ if ( ZBX_RUN_FOREGROUND == run_foreground) {
|
||||||
|
+ zabbix_log(LOG_LEVEL_INFORMATION, "Running in foreground...");
|
||||||
|
+ } else {
|
||||||
|
+ if (0 != (pid = zbx_fork()))
|
||||||
|
+ exit(EXIT_SUCCESS);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
|
||||||
|
if (-1 == chdir("/")) /* this is to eliminate warning: ignoring return value of chdir */
|
||||||
|
assert(0);
|
||||||
|
--- a/src/zabbix_agent/zabbix_agentd.c
|
||||||
|
+++ b/src/zabbix_agent/zabbix_agentd.c
|
||||||
|
@@ -62,6 +62,8 @@ const char *progname = NULL;
|
||||||
|
static char DEFAULT_CONFIG_FILE[] = SYSCONFDIR "/zabbix_agentd.conf";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+int CONFIG_FOREGROUND = ZBX_RUN_BACKGROUND;
|
||||||
|
+
|
||||||
|
/* application TITLE */
|
||||||
|
const char title_message[] = APPLICATION_NAME
|
||||||
|
#if defined(_WIN64)
|
||||||
|
@@ -93,6 +95,7 @@ const char usage_message[] =
|
||||||
|
const char *help_message[] = {
|
||||||
|
"Options:",
|
||||||
|
" -c --config <config-file> Absolute path to the configuration file",
|
||||||
|
+ " -f --foreground Run in foreground don't fork",
|
||||||
|
" -p --print Print known items and exit",
|
||||||
|
" -t --test <item key> Test specified item and exit",
|
||||||
|
" -h --help Display help information",
|
||||||
|
@@ -127,6 +130,7 @@ const char *help_message[] = {
|
||||||
|
/* COMMAND LINE OPTIONS */
|
||||||
|
static struct zbx_option longopts[] =
|
||||||
|
{
|
||||||
|
+ {"foreground", 0, NULL, 'f'},
|
||||||
|
{"config", 1, NULL, 'c'},
|
||||||
|
{"help", 0, NULL, 'h'},
|
||||||
|
{"version", 0, NULL, 'V'},
|
||||||
|
@@ -147,7 +151,7 @@ static struct zbx_option longopts[] =
|
||||||
|
};
|
||||||
|
|
||||||
|
static char shortopts[] =
|
||||||
|
- "c:hVpt:"
|
||||||
|
+ "c:hfVpt:"
|
||||||
|
#ifndef _WINDOWS
|
||||||
|
"R:"
|
||||||
|
#else
|
||||||
|
@@ -241,6 +245,9 @@ static void parse_commandline(int argc,
|
||||||
|
{
|
||||||
|
switch (ch)
|
||||||
|
{
|
||||||
|
+ case 'f':
|
||||||
|
+ CONFIG_FOREGROUND = ZBX_RUN_FOREGROUND;
|
||||||
|
+ break;
|
||||||
|
case 'c':
|
||||||
|
CONFIG_FILE = strdup(zbx_optarg);
|
||||||
|
break;
|
||||||
|
@@ -944,7 +951,7 @@ int main(int argc, char **argv)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
- START_MAIN_ZABBIX_ENTRY(CONFIG_ALLOW_ROOT, CONFIG_USER);
|
||||||
|
+ START_MAIN_ZABBIX_ENTRY(CONFIG_ALLOW_ROOT, CONFIG_USER, CONFIG_FOREGROUND);
|
||||||
|
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
--- a/src/zabbix_proxy/proxy.c
|
||||||
|
+++ b/src/zabbix_proxy/proxy.c
|
||||||
|
@@ -60,6 +60,7 @@ const char usage_message[] = "[-hV] [-c
|
||||||
|
|
||||||
|
const char *help_message[] = {
|
||||||
|
"Options:",
|
||||||
|
+ " -f --foreground Run in foreground don't fork",
|
||||||
|
" -c --config <file> Absolute path to the configuration file",
|
||||||
|
" -R --runtime-control <option> Perform administrative functions",
|
||||||
|
"",
|
||||||
|
@@ -84,6 +85,7 @@ const char *help_message[] = {
|
||||||
|
/* long options */
|
||||||
|
static struct zbx_option longopts[] =
|
||||||
|
{
|
||||||
|
+ {"foreground", 0, NULL, 'f'},
|
||||||
|
{"config", 1, NULL, 'c'},
|
||||||
|
{"runtime-control", 1, NULL, 'R'},
|
||||||
|
{"help", 0, NULL, 'h'},
|
||||||
|
@@ -92,7 +94,7 @@ static struct zbx_option longopts[] =
|
||||||
|
};
|
||||||
|
|
||||||
|
/* short options */
|
||||||
|
-static char shortopts[] = "c:n:hVR:";
|
||||||
|
+static char shortopts[] = "c:n:fhVR:";
|
||||||
|
|
||||||
|
/* end of COMMAND LINE OPTIONS */
|
||||||
|
|
||||||
|
@@ -202,6 +204,7 @@ char *CONFIG_LOAD_MODULE_PATH = NULL;
|
||||||
|
char **CONFIG_LOAD_MODULE = NULL;
|
||||||
|
|
||||||
|
char *CONFIG_USER = NULL;
|
||||||
|
+int CONFIG_FOREGROUND = ZBX_RUN_BACKGROUND;
|
||||||
|
|
||||||
|
/* web monitoring */
|
||||||
|
#ifdef HAVE_LIBCURL
|
||||||
|
@@ -666,6 +669,9 @@ int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
switch (ch)
|
||||||
|
{
|
||||||
|
+ case 'f':
|
||||||
|
+ CONFIG_FOREGROUND = ZBX_RUN_FOREGROUND;
|
||||||
|
+ break;
|
||||||
|
case 'c':
|
||||||
|
CONFIG_FILE = zbx_strdup(CONFIG_FILE, zbx_optarg);
|
||||||
|
break;
|
||||||
|
@@ -705,7 +711,7 @@ int main(int argc, char **argv)
|
||||||
|
init_ipmi_handler();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER);
|
||||||
|
+ return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER, CONFIG_FOREGROUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
int MAIN_ZABBIX_ENTRY()
|
||||||
|
--- a/src/zabbix_server/server.c
|
||||||
|
+++ b/src/zabbix_server/server.c
|
||||||
|
@@ -64,6 +64,7 @@ const char usage_message[] = "[-hV] [-c
|
||||||
|
|
||||||
|
const char *help_message[] = {
|
||||||
|
"Options:",
|
||||||
|
+ " -f --foreground Run in foreground don't fork",
|
||||||
|
" -c --config <file> Absolute path to the configuration file",
|
||||||
|
" -R --runtime-control <option> Perform administrative functions",
|
||||||
|
"",
|
||||||
|
@@ -88,6 +89,7 @@ const char *help_message[] = {
|
||||||
|
/* long options */
|
||||||
|
static struct zbx_option longopts[] =
|
||||||
|
{
|
||||||
|
+ {"foreground", 0, NULL, 'f'},
|
||||||
|
{"config", 1, NULL, 'c'},
|
||||||
|
{"runtime-control", 1, NULL, 'R'},
|
||||||
|
{"help", 0, NULL, 'h'},
|
||||||
|
@@ -96,7 +98,7 @@ static struct zbx_option longopts[] =
|
||||||
|
};
|
||||||
|
|
||||||
|
/* short options */
|
||||||
|
-static char shortopts[] = "c:n:hVR:";
|
||||||
|
+static char shortopts[] = "c:n:fhVR:";
|
||||||
|
|
||||||
|
/* end of COMMAND LINE OPTIONS */
|
||||||
|
|
||||||
|
@@ -197,6 +199,7 @@ char *CONFIG_LOAD_MODULE_PATH = NULL;
|
||||||
|
char **CONFIG_LOAD_MODULE = NULL;
|
||||||
|
|
||||||
|
char *CONFIG_USER = NULL;
|
||||||
|
+int CONFIG_FOREGROUND = ZBX_RUN_BACKGROUND;
|
||||||
|
|
||||||
|
/* web monitoring */
|
||||||
|
#ifdef HAVE_LIBCURL
|
||||||
|
@@ -631,6 +634,9 @@ int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
switch (ch)
|
||||||
|
{
|
||||||
|
+ case 'f':
|
||||||
|
+ CONFIG_FOREGROUND = ZBX_RUN_FOREGROUND;
|
||||||
|
+ break;
|
||||||
|
case 'c':
|
||||||
|
CONFIG_FILE = zbx_strdup(CONFIG_FILE, zbx_optarg);
|
||||||
|
break;
|
||||||
|
@@ -670,7 +676,7 @@ int main(int argc, char **argv)
|
||||||
|
init_ipmi_handler();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER);
|
||||||
|
+ return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER, CONFIG_FOREGROUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
int MAIN_ZABBIX_ENTRY()
|
|
@ -9,12 +9,15 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=dkjson
|
PKG_NAME:=dkjson
|
||||||
PKG_VERSION:=2.5
|
PKG_VERSION:=2.5
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE_URL:=https://github.com/LuaDist/dkjson.git
|
||||||
PKG_SOURCE_URL:=http://dkolf.de/src/dkjson-lua.fsl/tarball/
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_MD5SUM:=af6b5f3df681e208f1dfb1a724a87e7c
|
PKG_SOURCE_VERSION:=e72ba0c9f5d8b8746fc306f6189a819dbb5cd0be
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=lua-cjson
|
PKG_NAME:=lua-cjson
|
||||||
PKG_VERSION:=2.1.0
|
PKG_VERSION:=2.1.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
|
PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
@ -29,7 +29,7 @@ define Package/lua-cjson
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
TITLE:=Lua CJSON parser
|
TITLE:=Lua CJSON parser
|
||||||
URL:=https://github.com/mpx/lua-cjson
|
URL:=https://github.com/mpx/lua-cjson
|
||||||
DEPENDS:= +lua +libzmq
|
DEPENDS:= +lua
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/lua-cjson/description
|
define Package/lua-cjson/description
|
||||||
|
|
|
@ -13,7 +13,7 @@ PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE_URL:=https://code.google.com/p/sha2/
|
PKG_SOURCE_URL:=https://github.com/lgierth/lua-sha2.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_VERSION:=02bd4bfdc806
|
PKG_SOURCE_VERSION:=02bd4bfdc806
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014 OpenWrt.org
|
# Copyright (C) 2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -9,27 +9,26 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luai2c
|
PKG_NAME:=luai2c
|
||||||
PKG_VERSION:=1.0.0
|
PKG_VERSION:=1.0.0
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_MAINTAINER:=Frank Edelhaeuser <fedel@users.sourceforge.net>
|
PKG_MAINTAINER:=Frank Edelhaeuser <mrpace2@gmail.com>
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
PKG_SOURCE_NAME:=i2c-lua
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
|
|
||||||
PKG_SOURCE_URL:=@SF/$(PKG_SOURCE_NAME)
|
|
||||||
PKG_MD5SUM:=7098577f101410b201cd43a7467e408d
|
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/mrpace2/i2c-lua.git
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_SOURCE_VERSION:=$(PKG_VERSION)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/luai2c
|
define Package/luai2c
|
||||||
SUBMENU:=Lua
|
SUBMENU:=Lua
|
||||||
SECTION:=lang
|
SECTION:=lang
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
TITLE:=Lua I2C binding
|
TITLE:=Lua I2C binding
|
||||||
URL:=http://sourceforge.net/projects/i2c-lua/
|
URL:=https://github.com/mrpace2/i2c-lua/
|
||||||
DEPENDS:=+liblua +kmod-i2c-core
|
DEPENDS:=+liblua +kmod-i2c-core
|
||||||
MAINTAINER:=Frank Edelhaeuser <fedel@users.sourceforge.net>
|
MAINTAINER:=Frank Edelhaeuser <mrpace2@gmail.com>
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/luai2c/description
|
define Package/luai2c/description
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luarocks
|
PKG_NAME:=luarocks
|
||||||
PKG_VERSION:=2.2.0-rc1
|
PKG_VERSION:=2.2.2
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luasec
|
PKG_NAME:=luasec
|
||||||
PKG_VERSION:=0.5
|
PKG_VERSION:=0.6
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/
|
PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/
|
||||||
PKG_MD5SUM:=0518f4524f399f33424c6f450e1d06db
|
PKG_MD5SUM:=14e1aef6d2aae96bbf98afc6b6634af2
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
MAINTAINER:=W. Michael Petullo <mike@flyn.org>
|
MAINTAINER:=W. Michael Petullo <mike@flyn.org>
|
||||||
|
@ -43,8 +43,8 @@ endef
|
||||||
MAKE_FLAGS += \
|
MAKE_FLAGS += \
|
||||||
INCDIR="$(TARGET_CPPFLAGS) -I." \
|
INCDIR="$(TARGET_CPPFLAGS) -I." \
|
||||||
LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
|
LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \
|
||||||
LUACPATH="/usr/lib/lua" \
|
LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \
|
||||||
LUAPATH="/usr/lib/lua"
|
LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(call Build/Compile/Default,linux)
|
$(call Build/Compile/Default,linux)
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
--- luasec-luasec-0.5-old/src/luasocket/Makefile 2014-01-29 21:43:33.000000000 +0100
|
|
||||||
+++ luasec-luasec-0.5/src/luasocket/Makefile 2014-11-30 13:07:44.850051000 +0100
|
|
||||||
@@ -6,7 +6,7 @@
|
|
||||||
|
|
||||||
CC ?= cc
|
|
||||||
CFLAGS += $(MYCFLAGS) -DLUASOCKET_DEBUG
|
|
||||||
-AR := ar rcu
|
|
||||||
+AR ?= ar
|
|
||||||
RANLIB ?= ranlib
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
||||||
@@ -14,7 +14,7 @@
|
|
||||||
all: libluasocket.a
|
|
||||||
|
|
||||||
libluasocket.a: $(OBJS)
|
|
||||||
- $(AR) $@ $(OBJS)
|
|
||||||
+ $(AR) rcu $@ $(OBJS)
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
clean:
|
|
|
@ -8,14 +8,14 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=lzmq
|
PKG_NAME:=lzmq
|
||||||
PKG_VERSION:=0.4.2
|
PKG_VERSION:=0.4.3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
|
PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/zip/v0.4.2?
|
PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/tar.gz/v$(PKG_VERSION)?
|
||||||
PKG_MD5SUM:=6789895c925e7eb9036e526181ec1a33
|
PKG_MD5SUM:=c4e51a60a5a26987bdce59e45d674a9e
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(INCLUDE_DIR)/cmake.mk
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008-2010 OpenWrt.org
|
# Copyright (C) 2008-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=micropython-lib
|
PKG_NAME:=micropython-lib
|
||||||
PKG_VERSION=0.1-20150302-$(PKG_SOURCE_VERSION)
|
PKG_VERSION=0.5-20150827-$(PKG_SOURCE_VERSION)
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
|
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
|
||||||
|
@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git
|
PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git
|
||||||
PKG_SOURCE_VERSION:=654c7d288603f7dae09eb09b57fb67b38c7ac6c3
|
PKG_SOURCE_VERSION:=bfbbf85a181d84e2494ea6f15be311734666bf67
|
||||||
|
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
|
||||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
|
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008-2010 OpenWrt.org
|
# Copyright (C) 2008-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=micropython
|
PKG_NAME:=micropython
|
||||||
PKG_VERSION=1.3.10-20150302-$(PKG_SOURCE_VERSION)
|
PKG_VERSION=1.4.5-20150827-$(PKG_SOURCE_VERSION)
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
|
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
|
||||||
|
@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=https://github.com/micropython/micropython.git
|
PKG_SOURCE_URL:=https://github.com/micropython/micropython.git
|
||||||
PKG_SOURCE_VERSION:=f2a889564b3a215902622b040a1247af38cb8203
|
PKG_SOURCE_VERSION:=936e25b164d837fc91e4bafd76580e747b235dff
|
||||||
|
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
|
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
|
||||||
|
|
67
lang/node-arduino-firmata/Makefile
Normal file
67
lang/node-arduino-firmata/Makefile
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2014 Arduino LLC
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NPM_NAME:=arduino-firmata
|
||||||
|
PKG_NAME:=node-$(PKG_NPM_NAME)
|
||||||
|
PKG_VERSION:=0.3.3
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git
|
||||||
|
PKG_SOURCE_VERSION:=16e76007edf218d72df590adbd711ac6b7432845
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=node
|
||||||
|
PKG_NODE_VERSION:=0.12.7
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
|
PKG_LICENSE_FILE:=LICENSE.txt
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/node-arduino-firmata
|
||||||
|
DEPENDS:=+node
|
||||||
|
SUBMENU:=Node.js
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
DEPENDS:=+node +node-serialport
|
||||||
|
TITLE:=Node.js package to access serial ports for reading and writing
|
||||||
|
URL:=https://www.npmjs.org/package/serialport
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-arduino-firmata/description
|
||||||
|
Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
/bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
|
||||||
|
$(Build/Patch)
|
||||||
|
endef
|
||||||
|
|
||||||
|
EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE_FLAGS) \
|
||||||
|
npm_config_arch=$(CONFIG_ARCH) \
|
||||||
|
npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
|
||||||
|
PREFIX="$(PKG_INSTALL_DIR)/usr/" \
|
||||||
|
$(STAGING_DIR_HOST)/bin/npm install -g $(PKG_BUILD_DIR)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-arduino-firmata/install
|
||||||
|
mkdir -p $(1)/usr/lib/node
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node
|
||||||
|
rm -rf $(1)/usr/lib/node/arduino-firmata/node_modules/serialport/
|
||||||
|
$(CP) -r ./files/* $(1)/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,node-arduino-firmata))
|
||||||
|
|
|
@ -0,0 +1,306 @@
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
var ArduinoFirmata, SerialPort, debug, events, exports, serialport,
|
||||||
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||||
|
hasProp = {}.hasOwnProperty;
|
||||||
|
|
||||||
|
events = require('eventemitter2');
|
||||||
|
|
||||||
|
SerialPort = (serialport = require('serialport')).SerialPort;
|
||||||
|
|
||||||
|
debug = require('debug')('arduino-firmata');
|
||||||
|
|
||||||
|
exports = module.exports = ArduinoFirmata = (function(superClass) {
|
||||||
|
extend(ArduinoFirmata, superClass);
|
||||||
|
|
||||||
|
ArduinoFirmata.Status = {
|
||||||
|
CLOSE: 0,
|
||||||
|
OPEN: 1
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.INPUT = 0;
|
||||||
|
|
||||||
|
ArduinoFirmata.OUTPUT = 1;
|
||||||
|
|
||||||
|
ArduinoFirmata.ANALOG = 2;
|
||||||
|
|
||||||
|
ArduinoFirmata.PWM = 3;
|
||||||
|
|
||||||
|
ArduinoFirmata.SERVO = 4;
|
||||||
|
|
||||||
|
ArduinoFirmata.SHIFT = 5;
|
||||||
|
|
||||||
|
ArduinoFirmata.I2C = 6;
|
||||||
|
|
||||||
|
ArduinoFirmata.LOW = 0;
|
||||||
|
|
||||||
|
ArduinoFirmata.HIGH = 1;
|
||||||
|
|
||||||
|
ArduinoFirmata.MAX_DATA_BYTES = 32;
|
||||||
|
|
||||||
|
ArduinoFirmata.DIGITAL_MESSAGE = 0x90;
|
||||||
|
|
||||||
|
ArduinoFirmata.ANALOG_MESSAGE = 0xE0;
|
||||||
|
|
||||||
|
ArduinoFirmata.REPORT_ANALOG = 0xC0;
|
||||||
|
|
||||||
|
ArduinoFirmata.REPORT_DIGITAL = 0xD0;
|
||||||
|
|
||||||
|
ArduinoFirmata.SET_PIN_MODE = 0xF4;
|
||||||
|
|
||||||
|
ArduinoFirmata.REPORT_VERSION = 0xF9;
|
||||||
|
|
||||||
|
ArduinoFirmata.SYSTEM_RESET = 0xFF;
|
||||||
|
|
||||||
|
ArduinoFirmata.START_SYSEX = 0xF0;
|
||||||
|
|
||||||
|
ArduinoFirmata.END_SYSEX = 0xF7;
|
||||||
|
|
||||||
|
ArduinoFirmata.list = function(callback) {
|
||||||
|
return serialport.list(function(err, ports) {
|
||||||
|
var devices, j, len, port;
|
||||||
|
if (err) {
|
||||||
|
return callback(err);
|
||||||
|
}
|
||||||
|
devices = [];
|
||||||
|
for (j = 0, len = ports.length; j < len; j++) {
|
||||||
|
port = ports[j];
|
||||||
|
if (/usb|acm|com\d+/i.test(port.comName)) {
|
||||||
|
devices.push(port.comName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return callback(null, devices);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
function ArduinoFirmata() {
|
||||||
|
this.status = ArduinoFirmata.Status.CLOSE;
|
||||||
|
this.wait_for_data = 0;
|
||||||
|
this.execute_multi_byte_command = 0;
|
||||||
|
this.multi_byte_channel = 0;
|
||||||
|
this.stored_input_data = [];
|
||||||
|
this.parsing_sysex = false;
|
||||||
|
this.sysex_bytes_read = 0;
|
||||||
|
this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
||||||
|
this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
||||||
|
this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
||||||
|
this.boardVersion = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.isOldArduinoDevice = function() {
|
||||||
|
return /usbserial|USB/.test(this.serialport_name);
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.connect = function(serialport_name, opts) {
|
||||||
|
this.serialport_name = serialport_name;
|
||||||
|
if (opts == null) {
|
||||||
|
opts = {
|
||||||
|
baudrate: 57600
|
||||||
|
};
|
||||||
|
}
|
||||||
|
opts.parser = serialport.parsers.raw;
|
||||||
|
if (!this.serialport_name) {
|
||||||
|
ArduinoFirmata.list((function(_this) {
|
||||||
|
return function(err, devices) {
|
||||||
|
return _this.connect(devices[0], opts);
|
||||||
|
};
|
||||||
|
})(this));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
this.once('boardReady', function() {
|
||||||
|
var io_init_wait;
|
||||||
|
debug('boardReady');
|
||||||
|
io_init_wait = this.isOldArduinoDevice() ? (debug("old arduino device found " + this.serialport_name), 3000) : (debug("new arduino device found " + this.serialport_name), 100);
|
||||||
|
debug("wait " + io_init_wait + "(msec)");
|
||||||
|
return setTimeout((function(_this) {
|
||||||
|
return function() {
|
||||||
|
var i, j, k;
|
||||||
|
for (i = j = 0; j < 6; i = ++j) {
|
||||||
|
_this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]);
|
||||||
|
}
|
||||||
|
for (i = k = 0; k < 2; i = ++k) {
|
||||||
|
_this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]);
|
||||||
|
}
|
||||||
|
debug('init IO ports');
|
||||||
|
return _this.emit('connect');
|
||||||
|
};
|
||||||
|
})(this), io_init_wait);
|
||||||
|
});
|
||||||
|
this.serialport = new SerialPort(this.serialport_name, opts);
|
||||||
|
this.serialport.once('open', (function(_this) {
|
||||||
|
return function() {
|
||||||
|
var cid;
|
||||||
|
cid = setInterval(function() {
|
||||||
|
debug('request REPORT_VERSION');
|
||||||
|
return _this.write([ArduinoFirmata.REPORT_VERSION]);
|
||||||
|
}, 500);
|
||||||
|
_this.once('boardVersion', function(version) {
|
||||||
|
clearInterval(cid);
|
||||||
|
_this.status = ArduinoFirmata.Status.OPEN;
|
||||||
|
return _this.emit('boardReady');
|
||||||
|
});
|
||||||
|
return _this.serialport.on('data', function(data) {
|
||||||
|
var byte, j, len, results;
|
||||||
|
results = [];
|
||||||
|
for (j = 0, len = data.length; j < len; j++) {
|
||||||
|
byte = data[j];
|
||||||
|
results.push(_this.process_input(byte));
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
})(this));
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.isOpen = function() {
|
||||||
|
return this.status === ArduinoFirmata.Status.OPEN;
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.close = function(callback) {
|
||||||
|
this.status = ArduinoFirmata.Status.CLOSE;
|
||||||
|
return this.serialport.close(callback);
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.reset = function(callback) {
|
||||||
|
return this.write([ArduinoFirmata.SYSTEM_RESET], callback);
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.write = function(bytes, callback) {
|
||||||
|
return this.serialport.write(bytes, callback);
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.sysex = function(command, data, callback) {
|
||||||
|
var write_data;
|
||||||
|
if (data == null) {
|
||||||
|
data = [];
|
||||||
|
}
|
||||||
|
data = data.map(function(i) {
|
||||||
|
return i & 0x7f;
|
||||||
|
});
|
||||||
|
write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]);
|
||||||
|
return this.write(write_data, callback);
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.pinMode = function(pin, mode, callback) {
|
||||||
|
switch (mode) {
|
||||||
|
case true:
|
||||||
|
mode = ArduinoFirmata.OUTPUT;
|
||||||
|
break;
|
||||||
|
case false:
|
||||||
|
mode = ArduinoFirmata.INPUT;
|
||||||
|
}
|
||||||
|
return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback);
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.digitalWrite = function(pin, value, callback) {
|
||||||
|
var port_num;
|
||||||
|
this.pinMode(pin, ArduinoFirmata.OUTPUT);
|
||||||
|
port_num = (pin >>> 3) & 0x0F;
|
||||||
|
if (value === 0 || value === false) {
|
||||||
|
this.digital_output_data[port_num] &= ~(1 << (pin & 0x07));
|
||||||
|
} else {
|
||||||
|
this.digital_output_data[port_num] |= 1 << (pin & 0x07);
|
||||||
|
}
|
||||||
|
return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback);
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.analogWrite = function(pin, value, callback) {
|
||||||
|
value = Math.floor(value);
|
||||||
|
this.pinMode(pin, ArduinoFirmata.PWM);
|
||||||
|
return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback);
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.servoWrite = function(pin, angle, callback) {
|
||||||
|
this.pinMode(pin, ArduinoFirmata.SERVO);
|
||||||
|
return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback);
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.digitalRead = function(pin) {
|
||||||
|
return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.analogRead = function(pin) {
|
||||||
|
return this.analog_input_data[pin];
|
||||||
|
};
|
||||||
|
|
||||||
|
ArduinoFirmata.prototype.process_input = function(input_data) {
|
||||||
|
var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data;
|
||||||
|
if (this.parsing_sysex) {
|
||||||
|
if (input_data === ArduinoFirmata.END_SYSEX) {
|
||||||
|
this.parsing_sysex = false;
|
||||||
|
sysex_command = this.stored_input_data[0];
|
||||||
|
sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read);
|
||||||
|
return this.emit('sysex', {
|
||||||
|
command: sysex_command,
|
||||||
|
data: sysex_data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.stored_input_data[this.sysex_bytes_read] = input_data;
|
||||||
|
return this.sysex_bytes_read += 1;
|
||||||
|
}
|
||||||
|
} else if (this.wait_for_data > 0 && input_data < 128) {
|
||||||
|
this.wait_for_data -= 1;
|
||||||
|
this.stored_input_data[this.wait_for_data] = input_data;
|
||||||
|
if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) {
|
||||||
|
switch (this.execute_multi_byte_command) {
|
||||||
|
case ArduinoFirmata.DIGITAL_MESSAGE:
|
||||||
|
input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
|
||||||
|
diff = this.digital_input_data[this.multi_byte_channel] ^ input_data;
|
||||||
|
this.digital_input_data[this.multi_byte_channel] = input_data;
|
||||||
|
if (this.listeners('digitalChange').length > 0) {
|
||||||
|
results = [];
|
||||||
|
for (i = j = 0; j <= 13; i = ++j) {
|
||||||
|
if (((0x01 << i) & diff) > 0) {
|
||||||
|
stat = (input_data & diff) > 0;
|
||||||
|
results.push(this.emit('digitalChange', {
|
||||||
|
pin: i + this.multi_byte_channel * 8,
|
||||||
|
value: stat,
|
||||||
|
old_value: !stat
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
results.push(void 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ArduinoFirmata.ANALOG_MESSAGE:
|
||||||
|
analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1];
|
||||||
|
old_analog_value = this.analogRead(this.multi_byte_channel);
|
||||||
|
this.analog_input_data[this.multi_byte_channel] = analog_value;
|
||||||
|
if (old_analog_value !== analog_value) {
|
||||||
|
return this.emit('analogChange', {
|
||||||
|
pin: this.multi_byte_channel,
|
||||||
|
value: analog_value,
|
||||||
|
old_value: old_analog_value
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ArduinoFirmata.REPORT_VERSION:
|
||||||
|
this.boardVersion = this.stored_input_data[1] + "." + this.stored_input_data[0];
|
||||||
|
return this.emit('boardVersion', this.boardVersion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (input_data < 0xF0) {
|
||||||
|
command = input_data & 0xF0;
|
||||||
|
this.multi_byte_channel = input_data & 0x0F;
|
||||||
|
} else {
|
||||||
|
command = input_data;
|
||||||
|
}
|
||||||
|
if (command === ArduinoFirmata.START_SYSEX) {
|
||||||
|
this.parsing_sysex = true;
|
||||||
|
return this.sysex_bytes_read = 0;
|
||||||
|
} else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) {
|
||||||
|
this.wait_for_data = 2;
|
||||||
|
return this.execute_multi_byte_command = command;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return ArduinoFirmata;
|
||||||
|
|
||||||
|
})(events.EventEmitter2);
|
||||||
|
|
||||||
|
}).call(this);
|
10
lang/node-arduino-firmata/patches/000-new-serialport.patch
Normal file
10
lang/node-arduino-firmata/patches/000-new-serialport.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/package.json
|
||||||
|
+++ b/package.json
|
||||||
|
@@ -30,7 +30,6 @@
|
||||||
|
"author": "Sho Hashimoto <hashimoto@shokai.org>",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
- "serialport": "*",
|
||||||
|
"eventemitter2": "*",
|
||||||
|
"debug": "*"
|
||||||
|
},
|
98
lang/node-cylon/Makefile
Normal file
98
lang/node-cylon/Makefile
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2014 Arduino LLC
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NPM_NAME:=cylon
|
||||||
|
PKG_NAME:=node-$(PKG_NPM_NAME)
|
||||||
|
PKG_VERSION:=0.22.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git
|
||||||
|
PKG_SOURCE_VERSION:=0c37da77e48b3e2cc3a8d566822a17689de91b40
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=node
|
||||||
|
PKG_NODE_VERSION:=0.12.7
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||||
|
PKG_LICENSE:=Apache-2.0
|
||||||
|
PKG_LICENSE_FILE:=LICENSE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/node-cylon/default
|
||||||
|
DEPENDS:=+node $(2)
|
||||||
|
SUBMENU:=Node.js
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
TITLE:=CylonJS - $(1)
|
||||||
|
URL:=https://www.npmjs.org/package/cylon
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-cylon
|
||||||
|
$(call Package/node-cylon/default,Core)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-cylon-i2c
|
||||||
|
$(call Package/node-cylon/default,I2C,+node-cylon)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-cylon-gpio
|
||||||
|
$(call Package/node-cylon/default,GPIO,+node-cylon)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-cylon-firmata
|
||||||
|
$(call Package/node-cylon/default,Firmata,+node-cylon-gpio +node-cylon-i2c +node-arduino-firmata)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-cylon/description
|
||||||
|
JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
/bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
|
||||||
|
$(Build/Patch)
|
||||||
|
endef
|
||||||
|
|
||||||
|
EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE_FLAGS) \
|
||||||
|
npm_config_arch=$(CONFIG_ARCH) \
|
||||||
|
npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
|
||||||
|
PREFIX="$(PKG_INSTALL_DIR)/usr/" \
|
||||||
|
$(STAGING_DIR_HOST)/bin/npm install -g $(PKG_BUILD_DIR)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-cylon/install
|
||||||
|
mkdir -p $(1)/usr/lib/node/cylon
|
||||||
|
$(CP) -r $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon/* $(1)/usr/lib/node/cylon/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-cylon-i2c/install
|
||||||
|
mkdir -p $(1)/usr/lib/node/cylon-i2c
|
||||||
|
$(CP) -r $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-i2c/* $(1)/usr/lib/node/cylon-i2c/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-cylon-gpio/install
|
||||||
|
mkdir -p $(1)/usr/lib/node/cylon-gpio
|
||||||
|
$(CP) -r $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-gpio/* $(1)/usr/lib/node/cylon-gpio/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-cylon-firmata/install
|
||||||
|
mkdir -p $(1)/usr/lib/node/cylon-firmata
|
||||||
|
$(CP) -r $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/{index.js,lib,LICENSE,package.json,README.md,RELEASES.md,spec} $(1)/usr/lib/node/cylon-firmata/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,node-cylon))
|
||||||
|
$(eval $(call BuildPackage,node-cylon-i2c))
|
||||||
|
$(eval $(call BuildPackage,node-cylon-gpio))
|
||||||
|
$(eval $(call BuildPackage,node-cylon-firmata))
|
||||||
|
|
12
lang/node-cylon/patches/0001-serialport.patch
Normal file
12
lang/node-cylon/patches/0001-serialport.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
Index: node-cylon-0.22.0/package.json
|
||||||
|
===================================================================
|
||||||
|
--- node-cylon-0.22.0.orig/package.json 2015-10-20 20:32:48.000000000 +0200
|
||||||
|
+++ node-cylon-0.22.0/package.json 2015-10-21 10:42:20.616109122 +0200
|
||||||
|
@@ -38,7 +38,6 @@
|
||||||
|
},
|
||||||
|
|
||||||
|
"dependencies": {
|
||||||
|
- "firmata": ">= 0.3.2",
|
||||||
|
"cylon": "1.1.0",
|
||||||
|
"cylon-gpio": "0.26.0",
|
||||||
|
"cylon-i2c": "0.22.0"
|
62
lang/node-hid/Makefile
Normal file
62
lang/node-hid/Makefile
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NPM_NAME:=hid
|
||||||
|
PKG_NAME:=node-$(PKG_NPM_NAME)
|
||||||
|
PKG_VERSION:=0.4.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_SOURCE_VERSION:=c56c8aa5d113c6f2574d1f7e64d41745702965bb
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=node
|
||||||
|
PKG_NODE_VERSION:=0.12.7
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||||
|
PKG_LICENSE:=Custom
|
||||||
|
PKG_LICENSE_FILE:=
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/node-hid
|
||||||
|
DEPENDS:=+node
|
||||||
|
SUBMENU:=Node.js
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
DEPENDS:=+libusb-1.0 +hidapi +libstdcpp
|
||||||
|
TITLE:=Node.js package to access HID devices
|
||||||
|
URL:=https://github.com/node-hid/node-hid
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-hid/description
|
||||||
|
Node.js package to access HID devices
|
||||||
|
endef
|
||||||
|
|
||||||
|
EXTRA_LDFLAGS+="-lhidapi-libusb"
|
||||||
|
EXTRA_CFLAGS+="-I$(STAGING_DIR)/usr/include/hidapi/"
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE_VARS) \
|
||||||
|
$(MAKE_FLAGS) \
|
||||||
|
npm_config_arch=$(CONFIG_ARCH) \
|
||||||
|
npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
|
||||||
|
PREFIX="$(PKG_INSTALL_DIR)/usr/" \
|
||||||
|
$(STAGING_DIR_HOST)/bin/npm install -g $(PKG_BUILD_DIR)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-hid/install
|
||||||
|
mkdir -p $(1)/usr/lib/node/node-hid/
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/node-hid/{index.js,package.json,build,node_modules} $(1)/usr/lib/node/node-hid/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,node-hid))
|
||||||
|
|
2457
lang/node-hid/patches/000-compile.patch
Normal file
2457
lang/node-hid/patches/000-compile.patch
Normal file
File diff suppressed because it is too large
Load diff
62
lang/node-serialport/Makefile
Normal file
62
lang/node-serialport/Makefile
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2014 Arduino LLC
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NPM_NAME:=serialport
|
||||||
|
PKG_NAME:=node-$(PKG_NPM_NAME)
|
||||||
|
PKG_VERSION:=1.4.6
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz
|
||||||
|
PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
|
||||||
|
PKG_MD5SUM:=1eb21082e0aa676b8350182a60230808
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=node
|
||||||
|
PKG_NODE_VERSION:=0.12.7
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||||
|
PKG_LICENSE:=Custom
|
||||||
|
PKG_LICENSE_FILE:=LICENSE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/node-serialport
|
||||||
|
DEPENDS:=+node
|
||||||
|
SUBMENU:=Node.js
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
TITLE:=Node.js package to access serial ports for reading and writing
|
||||||
|
URL:=https://www.npmjs.org/package/serialport
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-serialport/description
|
||||||
|
Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them!
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
/bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1
|
||||||
|
$(Build/Patch)
|
||||||
|
endef
|
||||||
|
|
||||||
|
EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE_FLAGS) \
|
||||||
|
npm_config_arch=$(CONFIG_ARCH) \
|
||||||
|
npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
|
||||||
|
PREFIX="$(PKG_INSTALL_DIR)/usr/" \
|
||||||
|
$(STAGING_DIR_HOST)/bin/npm install -g $(PKG_BUILD_DIR)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node-serialport/install
|
||||||
|
mkdir -p $(1)/usr/lib/node/
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,node-serialport))
|
||||||
|
|
11
lang/node-serialport/patches/package.json.patch
Normal file
11
lang/node-serialport/patches/package.json.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/package.json 2014-05-02 12:02:02.940515727 +0200
|
||||||
|
+++ b/package.json 2014-05-02 12:03:08.488512762 +0200
|
||||||
|
@@ -69,7 +71,7 @@
|
||||||
|
"serialportterm": "./bin/serialportTerminal.js"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
- "install": "node-pre-gyp install --fallback-to-build",
|
||||||
|
+ "install": "node-pre-gyp reinstall --build-from-source --target_arch=${npm_config_arch}",
|
||||||
|
"test": "grunt --verbose"
|
||||||
|
}
|
||||||
|
}
|
73
lang/node/Makefile
Normal file
73
lang/node/Makefile
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2006-2011 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=node
|
||||||
|
PKG_VERSION:=v0.12.7
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=node-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION}
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=python/host
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||||
|
PKG_LICENSE:=
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/host-build.mk
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/node
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
SUBMENU:=Node.js
|
||||||
|
TITLE:=Node.js is a platform built on Chrome's JavaScript runtime
|
||||||
|
URL:=http://nodejs.org/
|
||||||
|
DEPENDS:=+libpthread +librt +libstdcpp +libopenssl +libuv
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node/description
|
||||||
|
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses
|
||||||
|
an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js'
|
||||||
|
package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS= \
|
||||||
|
--dest-cpu=$(CONFIG_ARCH) \
|
||||||
|
--dest-os=linux \
|
||||||
|
--without-snapshot \
|
||||||
|
--shared-zlib \
|
||||||
|
--shared-openssl \
|
||||||
|
--prefix=/usr
|
||||||
|
|
||||||
|
HOST_CONFIGURE_VARS:=
|
||||||
|
HOST_CONFIGURE_ARGS:= \
|
||||||
|
--dest-os=linux \
|
||||||
|
--without-snapshot \
|
||||||
|
--prefix=$(STAGING_DIR_HOST)/
|
||||||
|
|
||||||
|
HOST_CONFIGURE_CMD:=python ./configure
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/node/install
|
||||||
|
mkdir -p $(1)/usr/bin $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules}
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/{node,npm} $(1)/usr/bin/
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE,cli.js} $(1)/usr/lib/node_modules/npm
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/lib/node_modules/npm/bin
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/lib/* $(1)/usr/lib/node_modules/npm/lib/
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/node_modules/* $(1)/usr/lib/node_modules/npm/node_modules/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call HostBuild))
|
||||||
|
$(eval $(call BuildPackage,node))
|
15
lang/node/patches/001-mips-no-fpu.patch
Normal file
15
lang/node/patches/001-mips-no-fpu.patch
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
--- a/deps/v8/build/toolchain.gypi
|
||||||
|
+++ b/deps/v8/build/toolchain.gypi
|
||||||
|
@@ -50,10 +50,10 @@
|
||||||
|
'arm_test_noprobe%': 'off',
|
||||||
|
|
||||||
|
# Similar to vfp but on MIPS.
|
||||||
|
- 'v8_can_use_fpu_instructions%': 'true',
|
||||||
|
+ 'v8_can_use_fpu_instructions%': 'false',
|
||||||
|
|
||||||
|
# Similar to the ARM hard float ABI but on MIPS.
|
||||||
|
- 'v8_use_mips_abi_hardfloat%': 'true',
|
||||||
|
+ 'v8_use_mips_abi_hardfloat%': 'false',
|
||||||
|
|
||||||
|
# Default arch variant for MIPS.
|
||||||
|
'mips_arch_variant%': 'r2',
|
10
lang/node/patches/002-addr_info.patch
Normal file
10
lang/node/patches/002-addr_info.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/deps/uv/src/unix/getaddrinfo.c
|
||||||
|
+++ b/deps/uv/src/unix/getaddrinfo.c
|
||||||
|
@@ -99,6 +99,7 @@
|
||||||
|
int err;
|
||||||
|
|
||||||
|
req = container_of(w, uv_getaddrinfo_t, work_req);
|
||||||
|
+ req->hints->ai_flags &= ~AI_V4MAPPED;
|
||||||
|
err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo);
|
||||||
|
req->retcode = uv__getaddrinfo_translate_error(err);
|
||||||
|
}
|
12
lang/node/patches/003-path.patch
Normal file
12
lang/node/patches/003-path.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- a/lib/module.js
|
||||||
|
+++ b/lib/module.js
|
||||||
|
@@ -512,7 +512,8 @@
|
||||||
|
var homeDir = process.env.HOME;
|
||||||
|
}
|
||||||
|
|
||||||
|
- var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
|
||||||
|
+ var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node'),
|
||||||
|
+ path.resolve(process.execPath, '..', '..', 'lib', 'node_modules')];
|
||||||
|
|
||||||
|
if (homeDir) {
|
||||||
|
paths.unshift(path.resolve(homeDir, '.node_libraries'));
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=perl-dbi
|
PKG_NAME:=perl-dbi
|
||||||
PKG_VERSION:=1.633
|
PKG_VERSION:=1.641
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/
|
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/
|
||||||
PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz
|
||||||
PKG_MD5SUM:=b4fe13b9a51c1446c5f3cf93e69a2044
|
PKG_MD5SUM:=e77fd37fcf77fc88fde029c1b75ded54
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
||||||
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
|
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=perl-html-parser
|
PKG_NAME:=perl-html-parser
|
||||||
PKG_VERSION:=3.71
|
PKG_VERSION:=3.72
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS/
|
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS/
|
||||||
PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz
|
||||||
PKG_MD5SUM:=9128a45893097dfa3bf03301b19c5efe
|
PKG_MD5SUM:=eb7505e5f626913350df9dd4a03d54a8
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
||||||
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
|
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=perl-uri
|
PKG_NAME:=perl-uri
|
||||||
PKG_VERSION:=1.67
|
PKG_VERSION:=1.74
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
|
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
|
||||||
PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz
|
||||||
PKG_MD5SUM:=d0ef53b6c63bcc02ba55f405c30741e3
|
PKG_MD5SUM:=892f7183b178af40f205ba37128225db
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
||||||
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
|
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=perl-www-mechanize
|
PKG_NAME:=perl-www-mechanize
|
||||||
PKG_VERSION:=1.74
|
PKG_VERSION:=1.75
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=WWW-Mechanize-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=WWW-Mechanize-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
|
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/
|
||||||
PKG_MD5SUM:=8ec615225037ac66a2d37f4e9693ef86
|
PKG_MD5SUM:=9a4b9c8827f519908ef0a0d2b8ae96fa
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl
|
||||||
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
|
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2015 OpenWrt.org
|
# Copyright (C) 2006-2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,17 +8,17 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=php
|
PKG_NAME:=php
|
||||||
PKG_VERSION:=5.6.8
|
PKG_VERSION:=5.6.32
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
|
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>, Michael Heimpold <mhei@heimpold.de>
|
||||||
|
|
||||||
PKG_LICENSE:=PHPv3.01
|
PKG_LICENSE:=PHPv3.01
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=http://www.php.net/distributions/
|
PKG_SOURCE_URL:=http://www.php.net/distributions/
|
||||||
PKG_MD5SUM:=a5a6df33aade0cb5425e4374e3832f0b
|
PKG_MD5SUM:=660cd5bc0f16eaad655b7815c757aadc
|
||||||
|
|
||||||
PKG_FIXUP:=libtool autoreconf
|
PKG_FIXUP:=libtool autoreconf
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
@ -32,11 +32,11 @@ PHP5_MODULES = \
|
||||||
ftp \
|
ftp \
|
||||||
gettext gd gmp \
|
gettext gd gmp \
|
||||||
hash \
|
hash \
|
||||||
iconv \
|
iconv intl \
|
||||||
json \
|
json \
|
||||||
ldap \
|
ldap \
|
||||||
mbstring mcrypt mysql mysqli \
|
mbstring mcrypt mysql mysqli \
|
||||||
openssl \
|
opcache openssl \
|
||||||
pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql \
|
pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql \
|
||||||
session shmop simplexml soap sockets sqlite3 sysvmsg sysvsem sysvshm \
|
session shmop simplexml soap sockets sqlite3 sysvmsg sysvsem sysvshm \
|
||||||
tokenizer \
|
tokenizer \
|
||||||
|
@ -55,7 +55,6 @@ define Package/php5/Default
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
TITLE:=PHP5 Hypertext preprocessor
|
TITLE:=PHP5 Hypertext preprocessor
|
||||||
URL:=http://www.php.net/
|
URL:=http://www.php.net/
|
||||||
MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
|
|
||||||
DEPENDS:=php5
|
DEPENDS:=php5
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -99,6 +98,7 @@ endef
|
||||||
|
|
||||||
define Package/php5-cli
|
define Package/php5-cli
|
||||||
$(call Package/php5/Default)
|
$(call Package/php5/Default)
|
||||||
|
DEPENDS+= +PACKAGE_php5-mod-intl:libstdcpp
|
||||||
TITLE+= (CLI)
|
TITLE+= (CLI)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -109,6 +109,7 @@ endef
|
||||||
|
|
||||||
define Package/php5-cgi
|
define Package/php5-cgi
|
||||||
$(call Package/php5/Default)
|
$(call Package/php5/Default)
|
||||||
|
DEPENDS+= +PACKAGE_php5-mod-intl:libstdcpp
|
||||||
TITLE+= (CGI & FastCGI)
|
TITLE+= (CGI & FastCGI)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -238,6 +239,12 @@ else
|
||||||
CONFIGURE_ARGS+= --without-iconv
|
CONFIGURE_ARGS+= --without-iconv
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-intl),)
|
||||||
|
CONFIGURE_ARGS+= --enable-intl=shared
|
||||||
|
else
|
||||||
|
CONFIGURE_ARGS+= --disable-intl
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-json),)
|
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-json),)
|
||||||
CONFIGURE_ARGS+= --enable-json=shared
|
CONFIGURE_ARGS+= --enable-json=shared
|
||||||
else
|
else
|
||||||
|
@ -259,7 +266,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-mcrypt),)
|
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-mcrypt),)
|
||||||
CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr"
|
CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr"
|
||||||
else
|
else
|
||||||
CONFIGURE_ARGS+= --without-mcrypt
|
CONFIGURE_ARGS+= --without-mcrypt
|
||||||
endif
|
endif
|
||||||
|
@ -276,6 +283,12 @@ else
|
||||||
CONFIGURE_ARGS+= --without-mysqli
|
CONFIGURE_ARGS+= --without-mysqli
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-opcache),)
|
||||||
|
CONFIGURE_ARGS+= --enable-opcache=shared
|
||||||
|
else
|
||||||
|
CONFIGURE_ARGS+= --disable-opcache
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-openssl),)
|
ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-openssl),)
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
--with-openssl=shared,"$(STAGING_DIR)/usr" \
|
--with-openssl=shared,"$(STAGING_DIR)/usr" \
|
||||||
|
@ -508,7 +521,11 @@ define BuildModule
|
||||||
$(INSTALL_DIR) $$(1)/usr/lib/php
|
$(INSTALL_DIR) $$(1)/usr/lib/php
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/
|
||||||
$(INSTALL_DIR) $$(1)/etc/php5
|
$(INSTALL_DIR) $$(1)/etc/php5
|
||||||
|
ifeq ($(4),zend)
|
||||||
|
echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini
|
||||||
|
else
|
||||||
echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini
|
echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$$(eval $$(call BuildPackage,php5-mod-$(1)))
|
$$(eval $$(call BuildPackage,php5-mod-$(1)))
|
||||||
|
@ -534,12 +551,14 @@ $(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php5-mod-gettext:libintl-full
|
||||||
$(eval $(call BuildModule,gmp,GMP,+PACKAGE_php5-mod-gmp:libgmp))
|
$(eval $(call BuildModule,gmp,GMP,+PACKAGE_php5-mod-gmp:libgmp))
|
||||||
$(eval $(call BuildModule,hash,Hash))
|
$(eval $(call BuildModule,hash,Hash))
|
||||||
$(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS)))
|
$(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS)))
|
||||||
|
$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php5-mod-intl:icu))
|
||||||
$(eval $(call BuildModule,json,JSON))
|
$(eval $(call BuildModule,json,JSON))
|
||||||
$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php5-mod-ldap:libopenldap +PACKAGE_php5-mod-ldap:libsasl2))
|
$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php5-mod-ldap:libopenldap +PACKAGE_php5-mod-ldap:libsasl2))
|
||||||
$(eval $(call BuildModule,mbstring,MBString))
|
$(eval $(call BuildModule,mbstring,MBString))
|
||||||
$(eval $(call BuildModule,mcrypt,Mcrypt,+PACKAGE_php5-mod-mcrypt:libmcrypt +PACKAGE_php5-mod-mcrypt:libltdl))
|
$(eval $(call BuildModule,mcrypt,Mcrypt,+PACKAGE_php5-mod-mcrypt:libmcrypt +PACKAGE_php5-mod-mcrypt:libltdl))
|
||||||
$(eval $(call BuildModule,mysql,MySQL,+PACKAGE_php5-mod-mysql:libmysqlclient))
|
$(eval $(call BuildModule,mysql,MySQL,+PACKAGE_php5-mod-mysql:libmysqlclient))
|
||||||
$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php5-mod-mysqli:libmysqlclient))
|
$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php5-mod-mysqli:libmysqlclient))
|
||||||
|
$(eval $(call BuildModule,opcache,OPcache,,zend))
|
||||||
$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php5-mod-openssl:libopenssl))
|
$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php5-mod-openssl:libopenssl))
|
||||||
$(eval $(call BuildModule,pcntl,PCNTL))
|
$(eval $(call BuildModule,pcntl,PCNTL))
|
||||||
$(eval $(call BuildModule,pdo,PHP Data Objects))
|
$(eval $(call BuildModule,pdo,PHP Data Objects))
|
||||||
|
|
|
@ -309,3 +309,13 @@ ldap.max_links = -1
|
||||||
[mcrypt]
|
[mcrypt]
|
||||||
;mcrypt.algorithms_dir=
|
;mcrypt.algorithms_dir=
|
||||||
;mcrypt.modes_dir=
|
;mcrypt.modes_dir=
|
||||||
|
|
||||||
|
[opcache]
|
||||||
|
;opcache.memory_consumption=8 ; 8M is the allowed minimum
|
||||||
|
;opcache.interned_strings_buffer=1
|
||||||
|
opcache.max_accelerated_files=200 ; 200 is the allowed minimum
|
||||||
|
;opcache.revalidate_freq=60
|
||||||
|
;opcache.fast_shutdown=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.enable=1
|
||||||
|
;opcache.log_verbosity_level=4
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
|
|
||||||
Add support for use of the system timezone database, rather
|
Add support for use of the system timezone database, rather
|
||||||
than embedding a copy. Discussed upstream but was not desired.
|
than embedding a copy. Discussed upstream but was not desired.
|
||||||
|
|
||||||
History:
|
History:
|
||||||
r9: fix another compile error without --with-system-tzdata configured
|
r11: adopted to php 5.6.9
|
||||||
|
r10: make timezone case insensitive
|
||||||
|
r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold)
|
||||||
r8: fix compile error without --with-system-tzdata configured
|
r8: fix compile error without --with-system-tzdata configured
|
||||||
r7: improve check for valid timezone id to exclude directories
|
r7: improve check for valid timezone id to exclude directories
|
||||||
r6: fix fd leak in r5, fix country code/BC flag use in
|
r6: fix fd leak in r5, fix country code/BC flag use in.
|
||||||
timezone_identifiers_list() using system db,
|
timezone_identifiers_list() using system db,
|
||||||
fix use of PECL timezonedb to override system db,
|
fix use of PECL timezonedb to override system db,
|
||||||
r5: reverts addition of "System/Localtime" fake tzname.
|
r5: reverts addition of "System/Localtime" fake tzname.
|
||||||
|
@ -19,8 +20,14 @@ r1: initial revision
|
||||||
|
|
||||||
--- a/ext/date/lib/parse_tz.c
|
--- a/ext/date/lib/parse_tz.c
|
||||||
+++ b/ext/date/lib/parse_tz.c
|
+++ b/ext/date/lib/parse_tz.c
|
||||||
@@ -20,6 +20,16 @@
|
@@ -22,8 +22,22 @@
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#ifndef PATH_MAX
|
||||||
|
+#define PATH_MAX 4096
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
#include "timelib.h"
|
#include "timelib.h"
|
||||||
|
|
||||||
+#ifdef HAVE_SYSTEM_TZDATA
|
+#ifdef HAVE_SYSTEM_TZDATA
|
||||||
|
@ -36,12 +43,12 @@ r1: initial revision
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
@@ -31,7 +41,12 @@
|
@@ -36,8 +50,12 @@
|
||||||
#else
|
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
+
|
|
||||||
+#ifndef HAVE_SYSTEM_TZDATA
|
+#ifndef HAVE_SYSTEM_TZDATA
|
||||||
|
#define TIMELIB_SUPPORTS_V2DATA
|
||||||
#include "timezonedb.h"
|
#include "timezonedb.h"
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
|
@ -49,25 +56,19 @@ r1: initial revision
|
||||||
|
|
||||||
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
|
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
|
||||||
# if defined(__LITTLE_ENDIAN__)
|
# if defined(__LITTLE_ENDIAN__)
|
||||||
@@ -51,9 +66,14 @@
|
@@ -59,6 +77,11 @@ static int read_preamble(const unsigned
|
||||||
|
|
||||||
static void read_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
|
|
||||||
{
|
{
|
||||||
- /* skip ID */
|
uint32_t version;
|
||||||
- *tzf += 4;
|
|
||||||
-
|
+ if (memcmp(tzf, "TZif", 4) == 0) {
|
||||||
+ if (memcmp(tzf, "TZif", 4) == 0) {
|
+ *tzf += 20;
|
||||||
+ *tzf += 20;
|
+ return -1;
|
||||||
+ return;
|
+ }
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
+ /* skip ID */
|
/* read ID */
|
||||||
+ *tzf += 4;
|
version = (*tzf)[3] - '0';
|
||||||
+
|
*tzf += 4;
|
||||||
/* read BC flag */
|
@@ -302,7 +325,406 @@ void timelib_dump_tzinfo(timelib_tzinfo
|
||||||
tz->bc = (**tzf == '\1');
|
|
||||||
*tzf += 1;
|
|
||||||
@@ -256,7 +276,397 @@ void timelib_dump_tzinfo(timelib_tzinfo
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +82,7 @@ r1: initial revision
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
+/* System timezone database pointer. */
|
+/* System timezone database pointer. */
|
||||||
+static const timelib_tzdb *timezonedb_system = NULL;
|
+static const timelib_tzdb *timezonedb_system;
|
||||||
+
|
+
|
||||||
+/* Hash table entry for the cache of the zone.tab mapping table. */
|
+/* Hash table entry for the cache of the zone.tab mapping table. */
|
||||||
+struct location_info {
|
+struct location_info {
|
||||||
|
@ -99,13 +100,14 @@ r1: initial revision
|
||||||
+ * prevent too many collisions. */
|
+ * prevent too many collisions. */
|
||||||
+#define LOCINFO_HASH_SIZE (1021)
|
+#define LOCINFO_HASH_SIZE (1021)
|
||||||
+
|
+
|
||||||
|
+/* Compute a case insensitive hash of str */
|
||||||
+static uint32_t tz_hash(const char *str)
|
+static uint32_t tz_hash(const char *str)
|
||||||
+{
|
+{
|
||||||
+ const unsigned char *p = (const unsigned char *)str;
|
+ const unsigned char *p = (const unsigned char *)str;
|
||||||
+ uint32_t hash = 5381;
|
+ uint32_t hash = 5381;
|
||||||
+ int c;
|
+ int c;
|
||||||
+
|
+
|
||||||
+ while ((c = *p++) != '\0') {
|
+ while ((c = tolower(*p++)) != '\0') {
|
||||||
+ hash = (hash << 5) ^ hash ^ c;
|
+ hash = (hash << 5) ^ hash ^ c;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -443,6 +445,14 @@ r1: initial revision
|
||||||
+ return NULL;
|
+ return NULL;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ if (system_location_table) {
|
||||||
|
+ const struct location_info *li;
|
||||||
|
+ if ((li = find_zone_info(system_location_table, timezone)) != NULL) {
|
||||||
|
+ /* Use the stored name to avoid case issue */
|
||||||
|
+ timezone = li->name;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone);
|
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone);
|
||||||
+
|
+
|
||||||
+ fd = open(fname, O_RDONLY);
|
+ fd = open(fname, O_RDONLY);
|
||||||
|
@ -466,7 +476,7 @@ r1: initial revision
|
||||||
{
|
{
|
||||||
int left = 0, right = tzdb->index_size - 1;
|
int left = 0, right = tzdb->index_size - 1;
|
||||||
#ifdef HAVE_SETLOCALE
|
#ifdef HAVE_SETLOCALE
|
||||||
@@ -295,36 +705,128 @@ static int seek_to_tz_position(const uns
|
@@ -341,21 +763,90 @@ static int seek_to_tz_position(const uns
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,14 +493,14 @@ r1: initial revision
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ (*tzf) = (unsigned char *)orig ;
|
+ (*tzf) = (unsigned char *)orig;
|
||||||
+ *map = orig;
|
+ *map = orig;
|
||||||
+
|
+
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
+#endif
|
+#endif
|
||||||
+ {
|
+ {
|
||||||
+ return inmem_seek_to_tz_position(tzf, timezone, tzdb);
|
+ return inmem_seek_to_tz_position(tzf, timezone, tzdb);
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
|
@ -505,7 +515,7 @@ r1: initial revision
|
||||||
+ tmp->data = NULL;
|
+ tmp->data = NULL;
|
||||||
+ create_zone_index(tmp);
|
+ create_zone_index(tmp);
|
||||||
+ system_location_table = create_location_table();
|
+ system_location_table = create_location_table();
|
||||||
+ fake_data_segment(tmp, system_location_table);
|
+ fake_data_segment(tmp, system_location_table);
|
||||||
+ timezonedb_system = tmp;
|
+ timezonedb_system = tmp;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@ -533,38 +543,49 @@ r1: initial revision
|
||||||
- return (seek_to_tz_position(&tzf, timezone, tzdb));
|
- return (seek_to_tz_position(&tzf, timezone, tzdb));
|
||||||
+
|
+
|
||||||
+#ifdef HAVE_SYSTEM_TZDATA
|
+#ifdef HAVE_SYSTEM_TZDATA
|
||||||
+ if (tzdb == timezonedb_system) {
|
+ if (tzdb == timezonedb_system) {
|
||||||
+ char fname[PATH_MAX];
|
+ char fname[PATH_MAX];
|
||||||
+ struct stat st;
|
+ struct stat st;
|
||||||
+
|
+
|
||||||
+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) {
|
+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) {
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone);
|
+ if (system_location_table) {
|
||||||
|
+ if (find_zone_info(system_location_table, timezone) != NULL) {
|
||||||
|
+ /* found in cache */
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
+
|
+
|
||||||
+ return stat(fname, &st) == 0 && is_valid_tzfile(&st);
|
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone);
|
||||||
+ }
|
+
|
||||||
|
+ return stat(fname, &st) == 0 && is_valid_tzfile(&st);
|
||||||
|
+ }
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
+ return (inmem_seek_to_tz_position(&tzf, timezone, tzdb));
|
+ return (inmem_seek_to_tz_position(&tzf, timezone, tzdb));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
|
||||||
|
@@ -380,10 +871,12 @@ static void read_64bit_header(const unsi
|
||||||
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
|
timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
|
||||||
{
|
{
|
||||||
const unsigned char *tzf;
|
const unsigned char *tzf;
|
||||||
+ char *memmap = NULL;
|
+ char *memmap = NULL;
|
||||||
+ size_t maplen;
|
+ size_t maplen;
|
||||||
timelib_tzinfo *tmp;
|
timelib_tzinfo *tmp;
|
||||||
|
int version;
|
||||||
|
|
||||||
- if (seek_to_tz_position(&tzf, timezone, tzdb)) {
|
- if (seek_to_tz_position(&tzf, timezone, tzdb)) {
|
||||||
+ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) {
|
+ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) {
|
||||||
tmp = timelib_tzinfo_ctor(timezone);
|
tmp = timelib_tzinfo_ctor(timezone);
|
||||||
|
|
||||||
read_preamble(&tzf, tmp);
|
version = read_preamble(&tzf, tmp);
|
||||||
read_header(&tzf, tmp);
|
@@ -397,7 +890,34 @@ timelib_tzinfo *timelib_parse_tzfile(cha
|
||||||
read_transistions(&tzf, tmp);
|
skip_64bit_types(&tzf, tmp);
|
||||||
read_types(&tzf, tmp);
|
skip_posix_string(&tzf, tmp);
|
||||||
|
}
|
||||||
- read_location(&tzf, tmp);
|
- read_location(&tzf, tmp);
|
||||||
+
|
+
|
||||||
+#ifdef HAVE_SYSTEM_TZDATA
|
+#ifdef HAVE_SYSTEM_TZDATA
|
||||||
|
@ -576,12 +597,11 @@ r1: initial revision
|
||||||
+
|
+
|
||||||
+ if ((li = find_zone_info(system_location_table, timezone)) != NULL) {
|
+ if ((li = find_zone_info(system_location_table, timezone)) != NULL) {
|
||||||
+ tmp->location.comments = strdup(li->comment);
|
+ tmp->location.comments = strdup(li->comment);
|
||||||
+ strncpy(tmp->location.country_code, li->code, 2);
|
+ strncpy(tmp->location.country_code, li->code, 2);
|
||||||
+ tmp->location.longitude = li->longitude;
|
+ tmp->location.longitude = li->longitude;
|
||||||
+ tmp->location.latitude = li->latitude;
|
+ tmp->location.latitude = li->latitude;
|
||||||
+ tmp->bc = 1;
|
+ tmp->bc = 1;
|
||||||
+ }
|
+ } else {
|
||||||
+ else {
|
|
||||||
+ strcpy(tmp->location.country_code, "??");
|
+ strcpy(tmp->location.country_code, "??");
|
||||||
+ tmp->bc = 0;
|
+ tmp->bc = 0;
|
||||||
+ tmp->location.comments = strdup("");
|
+ tmp->location.comments = strdup("");
|
||||||
|
|
|
@ -0,0 +1,154 @@
|
||||||
|
From dc8bb6a53bfdfe42d9ae81d4e78c6155ad4bfd6e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Heimpold <mhei@heimpold.de>
|
||||||
|
Date: Sun, 17 May 2015 16:50:50 +0200
|
||||||
|
Subject: [PATCH] ext/opcache: fix detection of shm/mmap
|
||||||
|
|
||||||
|
The detection of sysvipc and mmap doesn't work well when cross-compiling,
|
||||||
|
so I decided to only check for the availability of the functions involved.
|
||||||
|
This is not a clean solution, but works for now(tm) :-)
|
||||||
|
|
||||||
|
It should be discussed with upstream to find a better solution.
|
||||||
|
|
||||||
|
This solves the issue reported at
|
||||||
|
https://github.com/openwrt/packages/issues/1010
|
||||||
|
and makes opcache usable on OpenWrt.
|
||||||
|
|
||||||
|
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
|
||||||
|
---
|
||||||
|
ext/opcache/config.m4 | 122 ++-----------------------------------------------
|
||||||
|
1 file changed, 4 insertions(+), 118 deletions(-)
|
||||||
|
|
||||||
|
--- a/ext/opcache/config.m4
|
||||||
|
+++ b/ext/opcache/config.m4
|
||||||
|
@@ -11,127 +11,13 @@ if test "$PHP_OPCACHE" != "no"; then
|
||||||
|
AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function])
|
||||||
|
])
|
||||||
|
|
||||||
|
- AC_MSG_CHECKING(for sysvipc shared memory support)
|
||||||
|
- AC_TRY_RUN([
|
||||||
|
-#include <sys/types.h>
|
||||||
|
-#include <sys/wait.h>
|
||||||
|
-#include <sys/ipc.h>
|
||||||
|
-#include <sys/shm.h>
|
||||||
|
-#include <unistd.h>
|
||||||
|
-#include <string.h>
|
||||||
|
-
|
||||||
|
-int main() {
|
||||||
|
- pid_t pid;
|
||||||
|
- int status;
|
||||||
|
- int ipc_id;
|
||||||
|
- char *shm;
|
||||||
|
- struct shmid_ds shmbuf;
|
||||||
|
-
|
||||||
|
- ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W));
|
||||||
|
- if (ipc_id == -1) {
|
||||||
|
- return 1;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- shm = shmat(ipc_id, NULL, 0);
|
||||||
|
- if (shm == (void *)-1) {
|
||||||
|
- shmctl(ipc_id, IPC_RMID, NULL);
|
||||||
|
- return 2;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) {
|
||||||
|
- shmdt(shm);
|
||||||
|
- shmctl(ipc_id, IPC_RMID, NULL);
|
||||||
|
- return 3;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- shmbuf.shm_perm.uid = getuid();
|
||||||
|
- shmbuf.shm_perm.gid = getgid();
|
||||||
|
- shmbuf.shm_perm.mode = 0600;
|
||||||
|
-
|
||||||
|
- if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) {
|
||||||
|
- shmdt(shm);
|
||||||
|
- shmctl(ipc_id, IPC_RMID, NULL);
|
||||||
|
- return 4;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- shmctl(ipc_id, IPC_RMID, NULL);
|
||||||
|
-
|
||||||
|
- strcpy(shm, "hello");
|
||||||
|
-
|
||||||
|
- pid = fork();
|
||||||
|
- if (pid < 0) {
|
||||||
|
- return 5;
|
||||||
|
- } else if (pid == 0) {
|
||||||
|
- strcpy(shm, "bye");
|
||||||
|
- return 6;
|
||||||
|
- }
|
||||||
|
- if (wait(&status) != pid) {
|
||||||
|
- return 7;
|
||||||
|
- }
|
||||||
|
- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
|
||||||
|
- return 8;
|
||||||
|
- }
|
||||||
|
- if (strcmp(shm, "bye") != 0) {
|
||||||
|
- return 9;
|
||||||
|
- }
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-],dnl
|
||||||
|
+ AC_CHECK_FUNC(shmget,[
|
||||||
|
AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
|
||||||
|
- msg=yes,msg=no,msg=no)
|
||||||
|
- AC_MSG_RESULT([$msg])
|
||||||
|
-
|
||||||
|
- AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
|
||||||
|
- AC_TRY_RUN([
|
||||||
|
-#include <sys/types.h>
|
||||||
|
-#include <sys/wait.h>
|
||||||
|
-#include <sys/mman.h>
|
||||||
|
-#include <unistd.h>
|
||||||
|
-#include <string.h>
|
||||||
|
-
|
||||||
|
-#ifndef MAP_ANON
|
||||||
|
-# ifdef MAP_ANONYMOUS
|
||||||
|
-# define MAP_ANON MAP_ANONYMOUS
|
||||||
|
-# endif
|
||||||
|
-#endif
|
||||||
|
-#ifndef MAP_FAILED
|
||||||
|
-# define MAP_FAILED ((void*)-1)
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
-int main() {
|
||||||
|
- pid_t pid;
|
||||||
|
- int status;
|
||||||
|
- char *shm;
|
||||||
|
-
|
||||||
|
- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
|
||||||
|
- if (shm == MAP_FAILED) {
|
||||||
|
- return 1;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- strcpy(shm, "hello");
|
||||||
|
+ ])
|
||||||
|
|
||||||
|
- pid = fork();
|
||||||
|
- if (pid < 0) {
|
||||||
|
- return 5;
|
||||||
|
- } else if (pid == 0) {
|
||||||
|
- strcpy(shm, "bye");
|
||||||
|
- return 6;
|
||||||
|
- }
|
||||||
|
- if (wait(&status) != pid) {
|
||||||
|
- return 7;
|
||||||
|
- }
|
||||||
|
- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) {
|
||||||
|
- return 8;
|
||||||
|
- }
|
||||||
|
- if (strcmp(shm, "bye") != 0) {
|
||||||
|
- return 9;
|
||||||
|
- }
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-],dnl
|
||||||
|
+ AC_CHECK_FUNC(mmap,[
|
||||||
|
AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
|
||||||
|
- msg=yes,msg=no,msg=no)
|
||||||
|
- AC_MSG_RESULT([$msg])
|
||||||
|
+ ])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support)
|
||||||
|
AC_TRY_RUN([
|
|
@ -1,7 +1,6 @@
|
||||||
diff -u --recursive php-5.6.6-vanilla/configure.in php-5.6.6/configure.in
|
--- a/configure.in
|
||||||
--- php-5.6.6-vanilla/configure.in 2015-02-26 22:10:51.865487530 -0500
|
+++ b/configure.in
|
||||||
+++ php-5.6.6/configure.in 2015-02-26 22:29:59.043102135 -0500
|
@@ -453,7 +453,10 @@ PHP_CHECK_FUNC(gethostname, nsl)
|
||||||
@@ -453,7 +453,10 @@
|
|
||||||
PHP_CHECK_FUNC(gethostbyaddr, nsl)
|
PHP_CHECK_FUNC(gethostbyaddr, nsl)
|
||||||
PHP_CHECK_FUNC(yp_get_default_domain, nsl)
|
PHP_CHECK_FUNC(yp_get_default_domain, nsl)
|
||||||
|
|
||||||
|
@ -13,10 +12,9 @@ diff -u --recursive php-5.6.6-vanilla/configure.in php-5.6.6/configure.in
|
||||||
if test "$ac_cv_func_dlopen" = "yes"; then
|
if test "$ac_cv_func_dlopen" = "yes"; then
|
||||||
AC_DEFINE(HAVE_LIBDL, 1, [ ])
|
AC_DEFINE(HAVE_LIBDL, 1, [ ])
|
||||||
fi
|
fi
|
||||||
diff -u --recursive php-5.6.6-vanilla/ext/fileinfo/config.m4 php-5.6.6/ext/fileinfo/config.m4
|
--- a/ext/fileinfo/config.m4
|
||||||
--- php-5.6.6-vanilla/ext/fileinfo/config.m4 2015-02-26 22:10:51.639487135 -0500
|
+++ b/ext/fileinfo/config.m4
|
||||||
+++ php-5.6.6/ext/fileinfo/config.m4 2015-02-26 22:22:47.645609128 -0500
|
@@ -46,6 +46,10 @@ int main(void)
|
||||||
@@ -46,6 +46,10 @@
|
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_MSG_NOTICE(using libmagic strcasestr implementation)
|
AC_MSG_NOTICE(using libmagic strcasestr implementation)
|
||||||
libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
|
libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
|
||||||
|
@ -27,10 +25,9 @@ diff -u --recursive php-5.6.6-vanilla/ext/fileinfo/config.m4 php-5.6.6/ext/filei
|
||||||
])
|
])
|
||||||
|
|
||||||
PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
|
PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
|
||||||
diff -u --recursive php-5.6.6-vanilla/ext/opcache/config.m4 php-5.6.6/ext/opcache/config.m4
|
--- a/ext/opcache/config.m4
|
||||||
--- php-5.6.6-vanilla/ext/opcache/config.m4 2015-02-26 22:10:51.790487399 -0500
|
+++ b/ext/opcache/config.m4
|
||||||
+++ php-5.6.6/ext/opcache/config.m4 2015-02-26 22:34:19.240414394 -0500
|
@@ -227,7 +227,14 @@ AC_TRY_RUN([
|
||||||
@@ -341,7 +341,14 @@
|
|
||||||
flock_type=linux
|
flock_type=linux
|
||||||
AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
|
AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
|
||||||
AC_MSG_RESULT("yes")
|
AC_MSG_RESULT("yes")
|
||||||
|
@ -46,7 +43,7 @@ diff -u --recursive php-5.6.6-vanilla/ext/opcache/config.m4 php-5.6.6/ext/opcach
|
||||||
|
|
||||||
AC_MSG_CHECKING("whether flock struct is BSD ordered")
|
AC_MSG_CHECKING("whether flock struct is BSD ordered")
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
@@ -357,7 +364,12 @@
|
@@ -243,7 +250,12 @@ AC_TRY_RUN([
|
||||||
flock_type=bsd
|
flock_type=bsd
|
||||||
AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type])
|
AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type])
|
||||||
AC_MSG_RESULT("yes")
|
AC_MSG_RESULT("yes")
|
||||||
|
@ -58,5 +55,5 @@ diff -u --recursive php-5.6.6-vanilla/ext/opcache/config.m4 php-5.6.6/ext/opcach
|
||||||
+ AC_MSG_RESULT("no")
|
+ AC_MSG_RESULT("no")
|
||||||
+])
|
+])
|
||||||
|
|
||||||
if test "$flock_type" == "unknown"; then
|
if test "$flock_type" = "unknown"; then
|
||||||
AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
|
AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011-2014 OpenWrt.org
|
# Copyright (C) 2011-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -10,13 +10,12 @@ define Package/php5-pecl/Default
|
||||||
SECTION:=lang
|
SECTION:=lang
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
URL:=http://pecl.php.net/
|
URL:=http://pecl.php.net/
|
||||||
MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
|
|
||||||
DEPENDS:=php5
|
DEPENDS:=php5
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Prepare
|
||||||
|
$(Build/Prepare/Default)
|
||||||
( cd $(PKG_BUILD_DIR); $(STAGING_DIR_HOST)/usr/bin/phpize )
|
( cd $(PKG_BUILD_DIR); $(STAGING_DIR_HOST)/usr/bin/phpize )
|
||||||
$(Build/Configure/Default)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
|
|
50
lang/python-pyserial/Makefile
Normal file
50
lang/python-pyserial/Makefile
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=python-pyserial
|
||||||
|
PKG_VERSION:=2.7
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_MAINTAINER:=Micke Prag <micke.prag@telldus.se>
|
||||||
|
PKG_LICENSE:=Python-2.0
|
||||||
|
|
||||||
|
PKG_SOURCE:=pyserial-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://pypi.python.org/packages/source/p/pyserial/
|
||||||
|
PKG_MD5SUM:=794506184df83ef2290de0d18803dd11
|
||||||
|
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/pyserial-$(PKG_VERSION)
|
||||||
|
PKG_BUILD_DEPENDS:=python
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
$(call include_mk, python-package.mk)
|
||||||
|
|
||||||
|
define Package/python-pyserial
|
||||||
|
SUBMENU:=Python
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
TITLE:=python-pyserial
|
||||||
|
URL:=http://pyserial.sourceforge.net
|
||||||
|
DEPENDS:=+python-light
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/python-pyserial/description
|
||||||
|
serial port python bindings
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr")
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/python-pyserial/install
|
||||||
|
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
|
||||||
|
$(CP) \
|
||||||
|
$(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
|
||||||
|
$(1)$(PYTHON_PKG_DIR)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,python-pyserial))
|
|
@ -12,11 +12,11 @@ include ./files/python-package.mk
|
||||||
|
|
||||||
PKG_NAME:=python
|
PKG_NAME:=python
|
||||||
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
|
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
|
||||||
PKG_MD5SUM:=38d530f7efc373d64a8fb1637e3baaa7
|
PKG_MD5SUM:=57dffcee9cee8bb2ab5f82af1d8e9a69
|
||||||
|
|
||||||
PKG_LICENSE:=PSF
|
PKG_LICENSE:=PSF
|
||||||
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
|
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
|
||||||
|
@ -29,6 +29,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
|
||||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=python/host
|
PKG_BUILD_DEPENDS:=python/host
|
||||||
|
HOST_BUILD_DEPENDS:=bzip2/host expat/host
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/host-build.mk
|
include $(INCLUDE_DIR)/host-build.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
@ -221,6 +222,7 @@ HOST_CONFIGURE_ARGS+= \
|
||||||
--without-cxx-main \
|
--without-cxx-main \
|
||||||
--without-pymalloc \
|
--without-pymalloc \
|
||||||
--with-threads \
|
--with-threads \
|
||||||
|
--with-system-expat=$(STAGING_DIR_HOST) \
|
||||||
--prefix=$(STAGING_DIR_HOST) \
|
--prefix=$(STAGING_DIR_HOST) \
|
||||||
--with-ensurepip=upgrade \
|
--with-ensurepip=upgrade \
|
||||||
CONFIG_SITE= \
|
CONFIG_SITE= \
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
PYTHON_VERSION:=2.7
|
PYTHON_VERSION:=2.7
|
||||||
PYTHON_VERSION_MICRO:=9
|
PYTHON_VERSION_MICRO:=12
|
||||||
|
|
||||||
PYTHON_DIR:=$(STAGING_DIR)/usr
|
PYTHON_DIR:=$(STAGING_DIR)/usr
|
||||||
PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
|
PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
|
||||||
|
@ -103,6 +103,7 @@ define Build/Compile/PyMod
|
||||||
cd $(PKG_BUILD_DIR)/$(strip $(1)); \
|
cd $(PKG_BUILD_DIR)/$(strip $(1)); \
|
||||||
CC="$(TARGET_CC)" \
|
CC="$(TARGET_CC)" \
|
||||||
CCSHARED="$(TARGET_CC) $(FPIC)" \
|
CCSHARED="$(TARGET_CC) $(FPIC)" \
|
||||||
|
CXX="$(TARGET_CXX)" \
|
||||||
LD="$(TARGET_CC)" \
|
LD="$(TARGET_CC)" \
|
||||||
LDSHARED="$(TARGET_CC) -shared" \
|
LDSHARED="$(TARGET_CC) -shared" \
|
||||||
CFLAGS="$(TARGET_CFLAGS)" \
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
diff --git a/setup.py b/setup.py
|
diff --git a/setup.py b/setup.py
|
||||||
index 7868b7b..9ae0ef2 100644
|
index 1d1ae72..511aed5 100644
|
||||||
--- a/setup.py
|
--- a/setup.py
|
||||||
+++ b/setup.py
|
+++ b/setup.py
|
||||||
@@ -444,7 +444,6 @@ class PyBuildExt(build_ext):
|
@@ -444,7 +444,8 @@ class PyBuildExt(build_ext):
|
||||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||||
if cross_compiling:
|
if cross_compiling:
|
||||||
self.add_gcc_paths()
|
self.add_gcc_paths()
|
||||||
- self.add_multiarch_paths()
|
- self.add_multiarch_paths()
|
||||||
|
+ else:
|
||||||
|
+ self.add_multiarch_paths()
|
||||||
|
|
||||||
# Add paths specified in the environment variables LDFLAGS and
|
# Add paths specified in the environment variables LDFLAGS and
|
||||||
# CPPFLAGS for header and library files.
|
# CPPFLAGS for header and library files.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2015 OpenWrt.org
|
# Copyright (C) 2006-2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -10,14 +10,14 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ruby
|
PKG_NAME:=ruby
|
||||||
PKG_VERSION:=2.2.2
|
PKG_VERSION:=2.2.6
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_LIBVER:=2.2
|
PKG_LIBVER:=2.2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
|
PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
|
||||||
PKG_MD5SUM:=af6eb4fa7247f1f7b2e19c8e6f3e3145
|
PKG_MD5SUM:=3d13cf447142b8a11cd9beb7bc63fee0
|
||||||
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||||
PKG_LICENSE:=BSD-2-Clause
|
PKG_LICENSE:=BSD-2-Clause
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
@ -833,6 +833,13 @@ endif
|
||||||
|
|
||||||
TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
|
TARGET_LDFLAGS += -L$(PKG_BUILD_DIR)
|
||||||
|
|
||||||
|
# Ruby uses DLDFLAGS and not LDFLAGS for libraries. LDFLAGS is only for execs.
|
||||||
|
# However, DLDFLAGS from configure is not passed to Makefile when target is linux.
|
||||||
|
# XLDFLAGS is used by both libraries and execs. This is somehow brute force but
|
||||||
|
# if will fix when some LD_FLAGS is needef for libraries. As side effect, it will
|
||||||
|
# duplicate ld args for binaries.
|
||||||
|
CONFIGURE_VARS += XLDFLAGS="$(TARGET_LDFLAGS)"
|
||||||
|
|
||||||
MAKE_FLAGS += \
|
MAKE_FLAGS += \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
SHELL="/bin/bash"
|
SHELL="/bin/bash"
|
||||||
|
|
|
@ -12,7 +12,7 @@ PKG_VERSION:=1.5.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=http://mirrors.ibiblio.org/apache/apr/
|
PKG_SOURCE_URL:=https://archive.apache.org/dist/apr/
|
||||||
PKG_MD5SUM:=4e9769f3349fe11fc0a5e1b224c236aa
|
PKG_MD5SUM:=4e9769f3349fe11fc0a5e1b224c236aa
|
||||||
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
|
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
|
||||||
PKG_LICENSE:=Apache License
|
PKG_LICENSE:=Apache License
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2007-2014 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=argp-standalone
|
|
||||||
PKG_VERSION:=1.3
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
||||||
PKG_SOURCE_URL:=http://www.lysator.liu.se/~nisse/misc/
|
|
||||||
PKG_MD5SUM:=720704bac078d067111b32444e24ba69
|
|
||||||
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
|
|
||||||
|
|
||||||
PKG_LICENSE:=LGPL-2.1
|
|
||||||
PKG_LICENSE:=Makefile.am
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define Package/argp-standalone
|
|
||||||
SECTION:=libs
|
|
||||||
CATEGORY:=Libraries
|
|
||||||
TITLE:=Hierarchial argument parsing broken out from glibc
|
|
||||||
URL:=http://www.lysator.liu.se/~nisse/misc/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/argp-standalone/description
|
|
||||||
GNU libc hierarchial argument parsing library broken out from glibc.
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKE_FLAGS += \
|
|
||||||
CFLAGS="$(TARGET_CFLAGS) $(FPIC)"
|
|
||||||
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $(1)/usr/include
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/argp.h \
|
|
||||||
$(1)/usr/include/
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/libargp.a \
|
|
||||||
$(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,argp-standalone))
|
|
|
@ -1,79 +0,0 @@
|
||||||
# --- T2-COPYRIGHT-NOTE-BEGIN ---
|
|
||||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
||||||
#
|
|
||||||
# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone
|
|
||||||
# Copyright (C) 2006 The T2 SDE Project
|
|
||||||
#
|
|
||||||
# More information can be found in the files COPYING and README.
|
|
||||||
#
|
|
||||||
# This patch file is dual-licensed. It is available under the license the
|
|
||||||
# patched project is licensed under, as long as it is an OpenSource license
|
|
||||||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
||||||
# of the GNU General Public License as published by the Free Software
|
|
||||||
# Foundation; either version 2 of the License, or (at your option) any later
|
|
||||||
# version.
|
|
||||||
# --- T2-COPYRIGHT-NOTE-END ---
|
|
||||||
|
|
||||||
|
|
||||||
No __THROW in function implementation.
|
|
||||||
--jsaw
|
|
||||||
|
|
||||||
--- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100
|
|
||||||
+++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100
|
|
||||||
@@ -560,17 +560,17 @@
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifndef ARGP_EI
|
|
||||||
-# define ARGP_EI extern __inline__
|
|
||||||
+# define ARGP_EI extern inline
|
|
||||||
# endif
|
|
||||||
|
|
||||||
ARGP_EI void
|
|
||||||
-__argp_usage (__const struct argp_state *__state) __THROW
|
|
||||||
+__argp_usage (__const struct argp_state *__state)
|
|
||||||
{
|
|
||||||
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
ARGP_EI int
|
|
||||||
-__option_is_short (__const struct argp_option *__opt) __THROW
|
|
||||||
+__option_is_short (__const struct argp_option *__opt)
|
|
||||||
{
|
|
||||||
if (__opt->flags & OPTION_DOC)
|
|
||||||
return 0;
|
|
||||||
@@ -582,7 +582,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
ARGP_EI int
|
|
||||||
-__option_is_end (__const struct argp_option *__opt) __THROW
|
|
||||||
+__option_is_end (__const struct argp_option *__opt)
|
|
||||||
{
|
|
||||||
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
|
|
||||||
}
|
|
||||||
--- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100
|
|
||||||
+++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100
|
|
||||||
@@ -1290,13 +1290,13 @@
|
|
||||||
/* Defined here, in case a user is not inlining the definitions in
|
|
||||||
* argp.h */
|
|
||||||
void
|
|
||||||
-__argp_usage (__const struct argp_state *__state) __THROW
|
|
||||||
+__argp_usage (__const struct argp_state *__state)
|
|
||||||
{
|
|
||||||
__argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
-__option_is_short (__const struct argp_option *__opt) __THROW
|
|
||||||
+__option_is_short (__const struct argp_option *__opt)
|
|
||||||
{
|
|
||||||
if (__opt->flags & OPTION_DOC)
|
|
||||||
return 0;
|
|
||||||
@@ -1310,7 +1310,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
-__option_is_end (__const struct argp_option *__opt) __THROW
|
|
||||||
+__option_is_end (__const struct argp_option *__opt)
|
|
||||||
{
|
|
||||||
return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2009-2014 OpenWrt.org
|
# Copyright (C) 2009-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -12,7 +12,7 @@ BASE_VERSION:=4.7.25
|
||||||
|
|
||||||
PKG_NAME:=db47
|
PKG_NAME:=db47
|
||||||
PKG_VERSION:=$(BASE_VERSION).4.NC
|
PKG_VERSION:=$(BASE_VERSION).4.NC
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4.1
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(BASE_VERSION).NC
|
PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(BASE_VERSION).NC
|
||||||
PKG_SOURCE:=db-$(BASE_VERSION).NC.tar.gz
|
PKG_SOURCE:=db-$(BASE_VERSION).NC.tar.gz
|
||||||
|
@ -62,7 +62,7 @@ CONFIGURE_ARGS += \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--enable-static \
|
--enable-static \
|
||||||
--disable-java \
|
--disable-java \
|
||||||
--with-mutex=UNIX/fcntl \
|
--with-mutex=POSIX/pthreads/library \
|
||||||
--disable-tcl \
|
--disable-tcl \
|
||||||
--disable-rpc \
|
--disable-rpc \
|
||||||
--enable-compat185 \
|
--enable-compat185 \
|
||||||
|
|
11
libs/db47/patches/100-disable_repmgr_hack.patch
Normal file
11
libs/db47/patches/100-disable_repmgr_hack.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/dist/configure
|
||||||
|
+++ b/dist/configure
|
||||||
|
@@ -32451,7 +32451,7 @@ if test "$db_cv_build_replication" = yes
|
||||||
|
|
||||||
|
case "$db_cv_mutex" in
|
||||||
|
POSIX/pthread*|Solaris/lwp)
|
||||||
|
- db_cv_build_replication_mgr=yes;;
|
||||||
|
+ db_cv_build_replication_mgr=no;;
|
||||||
|
esac
|
||||||
|
if test "$db_cv_pthread_api" = yes; then
|
||||||
|
db_cv_build_replication_mgr=yes
|
|
@ -1,97 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2010-2014 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=elfutils
|
|
||||||
PKG_VERSION:=0.161
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
||||||
PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
|
|
||||||
PKG_MD5SUM:=e1b9847c9a6a1ad340de8d47a863ec52
|
|
||||||
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
||||||
PKG_LICENSE:=GPL-3.0+
|
|
||||||
PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
|
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
|
||||||
PKG_USE_MIPS16:=0
|
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
include $(INCLUDE_DIR)/nls.mk
|
|
||||||
|
|
||||||
define Package/elfutils/Default
|
|
||||||
SECTION:=libs
|
|
||||||
CATEGORY:=Libraries
|
|
||||||
DEPENDS:=$(INTL_DEPENDS)
|
|
||||||
TITLE:=ELF manipulation libraries
|
|
||||||
URL:=https://fedorahosted.org/elfutils/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libasm
|
|
||||||
$(call Package/elfutils/Default)
|
|
||||||
TITLE+= (libasm)
|
|
||||||
DEPENDS:=libelf1
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libdw
|
|
||||||
$(call Package/elfutils/Default)
|
|
||||||
DEPENDS:=libelf1 +zlib +libbz2
|
|
||||||
TITLE+= (libdw)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libelf1
|
|
||||||
$(call Package/elfutils/Default)
|
|
||||||
TITLE+= (libelf)
|
|
||||||
endef
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_BUILD_NLS),y)
|
|
||||||
TARGET_LDFLAGS += "-lintl"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_USE_UCLIBC
|
|
||||||
CONFIGURE_VARS += \
|
|
||||||
LIBS="-largp"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_USE_MUSL
|
|
||||||
CONFIGURE_VARS += \
|
|
||||||
LIBS="-largp"
|
|
||||||
endif
|
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
|
||||||
--disable-werror \
|
|
||||||
--without-lzma
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $(1)/usr/include
|
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/libasm/libasm.{a,so*} $(1)/usr/lib/
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libasm/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/libasm/libasm.so* $(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libdw/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/libelf1/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/libelf/libelf.so* $(1)/usr/lib/
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,libasm))
|
|
||||||
$(eval $(call BuildPackage,libdw))
|
|
||||||
$(eval $(call BuildPackage,libelf1))
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,14 +0,0 @@
|
||||||
--- elfutils-0.160/lib/color.c.old 2014-11-06 03:46:43.584116134 -0200
|
|
||||||
+++ elfutils-0.160/lib/color.c 2014-11-06 03:47:25.840116128 -0200
|
|
||||||
@@ -131,8 +131,10 @@
|
|
||||||
- 'never', 'no', 'none'\n\
|
|
||||||
- 'auto', 'tty', 'if-tty'\n"),
|
|
||||||
program_invocation_short_name, arg);
|
|
||||||
+ char program_invocation_short_name_nonconst[sizeof(program_invocation_short_name)];
|
|
||||||
+ strcpy(program_invocation_short_name_nonconst, program_invocation_short_name);
|
|
||||||
argp_help (&color_argp, stderr, ARGP_HELP_SEE,
|
|
||||||
- program_invocation_short_name);
|
|
||||||
+ program_invocation_short_name_nonconst);
|
|
||||||
exit (EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
--- elfutils-0.160/libelf/libelfP.h.old 2014-11-06 01:47:55.420116984 -0200
|
|
||||||
+++ elfutils-0.160/libelf/libelfP.h 2014-11-06 01:48:33.368116980 -0200
|
|
||||||
@@ -43,6 +43,9 @@
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
+#ifdef _ /* fix libintl-stub */
|
|
||||||
+#undef _
|
|
||||||
+#endif
|
|
||||||
/* gettext helper macros. */
|
|
||||||
#define _(Str) dgettext ("elfutils", Str)
|
|
||||||
|
|
||||||
|
|
||||||
--- elfutils-0.160/libdw/libdwP.h.old 2014-11-06 02:27:12.628116703 -0200
|
|
||||||
+++ elfutils-0.160/libdw/libdwP.h 2014-11-06 02:27:39.816116700 -0200
|
|
||||||
@@ -36,7 +36,9 @@
|
|
||||||
#include <libdw.h>
|
|
||||||
#include <dwarf.h>
|
|
||||||
|
|
||||||
-
|
|
||||||
+#ifdef _ /* fix libintl-stub */
|
|
||||||
+#undef _
|
|
||||||
+#endif
|
|
||||||
/* gettext helper macros. */
|
|
||||||
#define _(Str) dgettext ("elfutils", Str)
|
|
||||||
|
|
||||||
--- elfutils-0.160/libdwfl/libdwflP.h.old 2014-11-06 02:31:20.112116673 -0200
|
|
||||||
+++ elfutils-0.160/libdwfl/libdwflP.h 2014-11-06 02:33:00.548116661 -0200
|
|
||||||
@@ -46,6 +46,9 @@
|
|
||||||
|
|
||||||
typedef struct Dwfl_Process Dwfl_Process;
|
|
||||||
|
|
||||||
+#ifdef _ /* fix libintl-stub */
|
|
||||||
+#undef _
|
|
||||||
+#endif
|
|
||||||
/* gettext helper macros. */
|
|
||||||
#define _(Str) dgettext ("elfutils", Str)
|
|
||||||
|
|
||||||
--- elfutils-0.160/libasm/libasmP.h.old 2014-11-06 02:31:32.064116672 -0200
|
|
||||||
+++ elfutils-0.160/libasm/libasmP.h 2014-11-06 02:33:08.656116660 -0200
|
|
||||||
@@ -33,6 +33,9 @@
|
|
||||||
|
|
||||||
#include <libasm.h>
|
|
||||||
|
|
||||||
+#ifdef _ /* fix libintl-stub */
|
|
||||||
+#undef _
|
|
||||||
+#endif
|
|
||||||
/* gettext helper macros. */
|
|
||||||
#define _(Str) dgettext ("elfutils", Str)
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- elfutils-0.160/libelf/elf_getarsym.c.org 2014-11-06 01:56:58.664116919 -0200
|
|
||||||
+++ elfutils-0.160/libelf/elf_getarsym.c 2014-11-06 01:57:09.396116918 -0200
|
|
||||||
@@ -166,7 +166,7 @@
|
|
||||||
|
|
||||||
/* We have an archive. The first word in there is the number of
|
|
||||||
entries in the table. */
|
|
||||||
- uint64_t n;
|
|
||||||
+ uint64_t n = 0;
|
|
||||||
size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr);
|
|
||||||
if (read_number_entries (&n, elf, &off, index64_p) < 0)
|
|
||||||
{
|
|
|
@ -1,14 +0,0 @@
|
||||||
--- a/libelf/libelf.h
|
|
||||||
+++ b/libelf/libelf.h
|
|
||||||
@@ -34,6 +34,11 @@
|
|
||||||
/* Get the ELF types. */
|
|
||||||
#include <elf.h>
|
|
||||||
|
|
||||||
+#ifndef _LIBC
|
|
||||||
+#ifndef __mempcpy
|
|
||||||
+#define __mempcpy mempcpy
|
|
||||||
+#endif
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Known translation types. */
|
|
||||||
typedef enum
|
|
|
@ -1,24 +0,0 @@
|
||||||
--- elfutils-0.160/Makefile.in.old 2014-11-06 03:56:04.828116067 -0200
|
|
||||||
+++ elfutils-0.160/Makefile.in 2014-11-06 03:57:03.380116060 -0200
|
|
||||||
@@ -359,8 +359,7 @@
|
|
||||||
pkginclude_HEADERS = version.h
|
|
||||||
|
|
||||||
# Add doc back when we have some real content.
|
|
||||||
-SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
|
|
||||||
- backends src po tests
|
|
||||||
+SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libasm
|
|
||||||
|
|
||||||
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
|
|
||||||
COPYING COPYING-GPLV2 COPYING-LGPLV3
|
|
||||||
--- elfutils-0.160/Makefile.am.old 2014-11-06 03:58:13.012116051 -0200
|
|
||||||
+++ elfutils-0.160/Makefile.am 2014-11-06 03:58:25.948116050 -0200
|
|
||||||
@@ -23,8 +23,7 @@
|
|
||||||
pkginclude_HEADERS = version.h
|
|
||||||
|
|
||||||
# Add doc back when we have some real content.
|
|
||||||
-SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
|
|
||||||
- backends src po tests
|
|
||||||
+SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libasm
|
|
||||||
|
|
||||||
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
|
|
||||||
COPYING COPYING-GPLV2 COPYING-LGPLV3
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- elfutils-0.161/libdw/Makefile.in.orig 2015-01-16 03:50:15.311237461 -0200
|
|
||||||
+++ elfutils-0.161/libdw/Makefile.in 2015-01-16 03:55:35.082090075 -0200
|
|
||||||
@@ -969,7 +969,7 @@
|
|
||||||
-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
|
|
||||||
-Wl,--version-script,$<,--no-undefined \
|
|
||||||
-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
|
|
||||||
- -ldl $(zip_LIBS)
|
|
||||||
+ -ldl $(zip_LIBS) $(LIBS)
|
|
||||||
@$(textrel_check)
|
|
||||||
ln -fs $@ $@.$(VERSION)
|
|
||||||
|
|
|
@ -1,788 +0,0 @@
|
||||||
--- a/lib/system.h
|
|
||||||
+++ b/lib/system.h
|
|
||||||
@@ -68,6 +68,16 @@ extern int crc32_file (int fd, uint32_t
|
|
||||||
|
|
||||||
#define gettext_noop(Str) Str
|
|
||||||
|
|
||||||
+#ifndef TEMP_FAILURE_RETRY
|
|
||||||
+#define TEMP_FAILURE_RETRY(expression) \
|
|
||||||
+ (__extension__ \
|
|
||||||
+ ({ long int __result; \
|
|
||||||
+ do __result = (long int) (expression); \
|
|
||||||
+ while (__result == -1L && errno == EINTR); \
|
|
||||||
+ __result; }))
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#define error(status, errno, ...) err(status, __VA_ARGS__)
|
|
||||||
|
|
||||||
static inline ssize_t __attribute__ ((unused))
|
|
||||||
pwrite_retry (int fd, const void *buf, size_t len, off_t off)
|
|
||||||
--- a/lib/color.c
|
|
||||||
+++ b/lib/color.c
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <argp.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
--- a/lib/xmalloc.c
|
|
||||||
+++ b/lib/xmalloc.c
|
|
||||||
@@ -30,7 +30,7 @@
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
--- a/src/addr2line.c
|
|
||||||
+++ b/src/addr2line.c
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
#include <argp.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <libdwfl.h>
|
|
||||||
--- a/src/ar.c
|
|
||||||
+++ b/src/ar.c
|
|
||||||
@@ -22,7 +22,7 @@
|
|
||||||
|
|
||||||
#include <argp.h>
|
|
||||||
#include <assert.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
--- a/src/arlib2.c
|
|
||||||
+++ b/src/arlib2.c
|
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <string.h>
|
|
||||||
--- a/src/arlib.c
|
|
||||||
+++ b/src/arlib.c
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
--- a/src/elfcmp.c
|
|
||||||
+++ b/src/elfcmp.c
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
#include <argp.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
--- a/src/elflint.c
|
|
||||||
+++ b/src/elflint.c
|
|
||||||
@@ -24,7 +24,7 @@
|
|
||||||
#include <assert.h>
|
|
||||||
#include <byteswap.h>
|
|
||||||
#include <endian.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
--- a/src/findtextrel.c
|
|
||||||
+++ b/src/findtextrel.c
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
#include <argp.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <libdw.h>
|
|
||||||
--- a/src/i386_ld.c
|
|
||||||
+++ b/src/i386_ld.c
|
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
--- a/src/ld.c
|
|
||||||
+++ b/src/ld.c
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
|
|
||||||
#include <argp.h>
|
|
||||||
#include <assert.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <libelf.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
--- a/src/ldgeneric.c
|
|
||||||
+++ b/src/ldgeneric.c
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <dlfcn.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <fnmatch.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
--- a/src/ldlex.c
|
|
||||||
+++ b/src/ldlex.c
|
|
||||||
@@ -1099,7 +1099,7 @@ char *ldtext;
|
|
||||||
#include <assert.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <elf.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
--- a/src/ldscript.c
|
|
||||||
+++ b/src/ldscript.c
|
|
||||||
@@ -95,7 +95,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
@@ -106,7 +106,7 @@
|
|
||||||
#include <system.h>
|
|
||||||
#include <ld.h>
|
|
||||||
|
|
||||||
-/* The error handler. */
|
|
||||||
+/* The err.handler. */
|
|
||||||
static void yyerror (const char *s);
|
|
||||||
|
|
||||||
/* Some helper functions we need to construct the data structures
|
|
||||||
--- a/src/nm.c
|
|
||||||
+++ b/src/nm.c
|
|
||||||
@@ -26,7 +26,7 @@
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <dwarf.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
--- a/src/objdump.c
|
|
||||||
+++ b/src/objdump.c
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <argp.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
--- a/src/ranlib.c
|
|
||||||
+++ b/src/ranlib.c
|
|
||||||
@@ -24,7 +24,7 @@
|
|
||||||
#include <argp.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
--- a/src/readelf.c
|
|
||||||
+++ b/src/readelf.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <dwarf.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
--- a/src/size.c
|
|
||||||
+++ b/src/size.c
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <argp.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
--- a/src/stack.c
|
|
||||||
+++ b/src/stack.c
|
|
||||||
@@ -18,7 +18,7 @@
|
|
||||||
#include <config.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <argp.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
--- a/src/strings.c
|
|
||||||
+++ b/src/strings.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <endian.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
--- a/src/strip.c
|
|
||||||
+++ b/src/strip.c
|
|
||||||
@@ -24,7 +24,7 @@
|
|
||||||
#include <assert.h>
|
|
||||||
#include <byteswap.h>
|
|
||||||
#include <endian.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <libelf.h>
|
|
||||||
--- a/src/unstrip.c
|
|
||||||
+++ b/src/unstrip.c
|
|
||||||
@@ -31,7 +31,7 @@
|
|
||||||
#include <argp.h>
|
|
||||||
#include <assert.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <fnmatch.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
--- a/tests/addrscopes.c
|
|
||||||
+++ b/tests/addrscopes.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
|
|
||||||
--- a/tests/allregs.c
|
|
||||||
+++ b/tests/allregs.c
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <argp.h>
|
|
||||||
#include <assert.h>
|
|
||||||
--- a/tests/backtrace.c
|
|
||||||
+++ b/tests/backtrace.c
|
|
||||||
@@ -24,7 +24,7 @@
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <dwarf.h>
|
|
||||||
#include <sys/resource.h>
|
|
||||||
--- a/tests/backtrace-data.c
|
|
||||||
+++ b/tests/backtrace-data.c
|
|
||||||
@@ -27,7 +27,7 @@
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <dwarf.h>
|
|
||||||
#include <sys/resource.h>
|
|
||||||
--- a/tests/buildid.c
|
|
||||||
+++ b/tests/buildid.c
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
#include ELFUTILS_HEADER(elf)
|
|
||||||
#include ELFUTILS_HEADER(dwelf)
|
|
||||||
#include <stdio.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
--- a/tests/debugaltlink.c
|
|
||||||
+++ b/tests/debugaltlink.c
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
#include ELFUTILS_HEADER(dw)
|
|
||||||
#include ELFUTILS_HEADER(dwelf)
|
|
||||||
#include <stdio.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
--- a/tests/debuglink.c
|
|
||||||
+++ b/tests/debuglink.c
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
#include <errno.h>
|
|
||||||
#include ELFUTILS_HEADER(dwelf)
|
|
||||||
#include <stdio.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
--- a/tests/dwfl-addr-sect.c
|
|
||||||
+++ b/tests/dwfl-addr-sect.c
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <argp.h>
|
|
||||||
#include ELFUTILS_HEADER(dwfl)
|
|
||||||
--- a/tests/dwfl-bug-addr-overflow.c
|
|
||||||
+++ b/tests/dwfl-bug-addr-overflow.c
|
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include ELFUTILS_HEADER(dwfl)
|
|
||||||
|
|
||||||
--- a/tests/dwfl-bug-fd-leak.c
|
|
||||||
+++ b/tests/dwfl-bug-fd-leak.c
|
|
||||||
@@ -24,7 +24,7 @@
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <dwarf.h>
|
|
||||||
#include <sys/resource.h>
|
|
||||||
--- a/tests/dwfl-bug-getmodules.c
|
|
||||||
+++ b/tests/dwfl-bug-getmodules.c
|
|
||||||
@@ -18,7 +18,7 @@
|
|
||||||
#include <config.h>
|
|
||||||
#include ELFUTILS_HEADER(dwfl)
|
|
||||||
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
|
|
||||||
static const Dwfl_Callbacks callbacks =
|
|
||||||
{
|
|
||||||
--- a/tests/dwfllines.c
|
|
||||||
+++ b/tests/dwfllines.c
|
|
||||||
@@ -27,7 +27,7 @@
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main (int argc, char *argv[])
|
|
||||||
--- a/tests/dwflmodtest.c
|
|
||||||
+++ b/tests/dwflmodtest.c
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <argp.h>
|
|
||||||
#include ELFUTILS_HEADER(dwfl)
|
|
||||||
--- a/tests/dwfl-report-elf-align.c
|
|
||||||
+++ b/tests/dwfl-report-elf-align.c
|
|
||||||
@@ -20,7 +20,7 @@
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
--- a/tests/dwflsyms.c
|
|
||||||
+++ b/tests/dwflsyms.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
static const char *
|
|
||||||
--- a/tests/early-offscn.c
|
|
||||||
+++ b/tests/early-offscn.c
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
--- a/tests/ecp.c
|
|
||||||
+++ b/tests/ecp.c
|
|
||||||
@@ -16,7 +16,7 @@
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
--- a/tests/find-prologues.c
|
|
||||||
+++ b/tests/find-prologues.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <fnmatch.h>
|
|
||||||
|
|
||||||
--- a/tests/funcretval.c
|
|
||||||
+++ b/tests/funcretval.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <fnmatch.h>
|
|
||||||
|
|
||||||
--- a/tests/funcscopes.c
|
|
||||||
+++ b/tests/funcscopes.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <fnmatch.h>
|
|
||||||
|
|
||||||
--- a/tests/line2addr.c
|
|
||||||
+++ b/tests/line2addr.c
|
|
||||||
@@ -26,7 +26,7 @@
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
--- a/tests/low_high_pc.c
|
|
||||||
+++ b/tests/low_high_pc.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include <stdio_ext.h>
|
|
||||||
#include <locale.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <fnmatch.h>
|
|
||||||
|
|
||||||
--- a/tests/md5-sha1-test.c
|
|
||||||
+++ b/tests/md5-sha1-test.c
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
|
|
||||||
#include "md5.h"
|
|
||||||
#include "sha1.h"
|
|
||||||
--- a/tests/rdwrmmap.c
|
|
||||||
+++ b/tests/rdwrmmap.c
|
|
||||||
@@ -15,7 +15,7 @@
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
--- a/tests/saridx.c
|
|
||||||
+++ b/tests/saridx.c
|
|
||||||
@@ -17,7 +17,7 @@
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
--- a/tests/sectiondump.c
|
|
||||||
+++ b/tests/sectiondump.c
|
|
||||||
@@ -18,7 +18,7 @@
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <gelf.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
--- a/tests/varlocs.c
|
|
||||||
+++ b/tests/varlocs.c
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#include <dwarf.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
--- a/libelf/libelf.h
|
|
||||||
+++ b/libelf/libelf.h
|
|
||||||
@@ -29,6 +29,7 @@
|
|
||||||
#ifndef _LIBELF_H
|
|
||||||
#define _LIBELF_H 1
|
|
||||||
|
|
||||||
+#include <fcntl.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
/* Get the ELF types. */
|
|
||||||
--- a/libasm/asm_end.c
|
|
||||||
+++ b/libasm/asm_end.c
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
--- a/libasm/asm_newscn.c
|
|
||||||
+++ b/libasm/asm_newscn.c
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
--- a/libcpu/i386_gendis.c
|
|
||||||
+++ b/libcpu/i386_gendis.c
|
|
||||||
@@ -31,7 +31,7 @@
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
--- a/libcpu/i386_lex.c
|
|
||||||
+++ b/libcpu/i386_lex.c
|
|
||||||
@@ -571,7 +571,7 @@ char *i386_text;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
|
|
||||||
#include <system.h>
|
|
||||||
--- a/libcpu/i386_lex.l
|
|
||||||
+++ b/libcpu/i386_lex.l
|
|
||||||
@@ -31,7 +31,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
|
|
||||||
#include <system.h>
|
|
||||||
--- a/libcpu/i386_parse.c
|
|
||||||
+++ b/libcpu/i386_parse.c
|
|
||||||
@@ -107,7 +107,7 @@
|
|
||||||
#include <assert.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <math.h>
|
|
||||||
--- a/libdw/libdw_alloc.c
|
|
||||||
+++ b/libdw/libdw_alloc.c
|
|
||||||
@@ -31,7 +31,7 @@
|
|
||||||
# include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
@@ -74,5 +74,5 @@ __attribute ((noreturn, visibility ("hid
|
|
||||||
__libdw_oom (void)
|
|
||||||
{
|
|
||||||
while (1)
|
|
||||||
- error (EXIT_FAILURE, ENOMEM, "libdw");
|
|
||||||
+ err (EXIT_FAILURE, "libdw: out of memory");
|
|
||||||
}
|
|
||||||
--- a/libebl/eblopenbackend.c
|
|
||||||
+++ b/libebl/eblopenbackend.c
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <dlfcn.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <libelfP.h>
|
|
||||||
#include <dwarf.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
--- a/src/ldlex.l
|
|
||||||
+++ b/src/ldlex.l
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
#include <assert.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <elf.h>
|
|
||||||
-#include <error.h>
|
|
||||||
+#include <err.h>
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <libintl.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
--- a/libebl/eblwstrtab.c
|
|
||||||
+++ b/libebl/eblwstrtab.c
|
|
||||||
@@ -305,7 +305,7 @@ copystrings (struct Ebl_WStrent *nodep,
|
|
||||||
|
|
||||||
/* Process the current node. */
|
|
||||||
nodep->offset = *offsetp;
|
|
||||||
- *freep = wmempcpy (*freep, nodep->string, nodep->len);
|
|
||||||
+ *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len;
|
|
||||||
*offsetp += nodep->len * sizeof (wchar_t);
|
|
||||||
|
|
||||||
for (subs = nodep->next; subs != NULL; subs = subs->next)
|
|
||||||
--- a/libdwfl/dwfl_error.c
|
|
||||||
+++ b/libdwfl/dwfl_error.c
|
|
||||||
@@ -128,6 +128,7 @@ const char *
|
|
||||||
dwfl_errmsg (error)
|
|
||||||
int error;
|
|
||||||
{
|
|
||||||
+ static __thread char s[64] = "";
|
|
||||||
if (error == 0 || error == -1)
|
|
||||||
{
|
|
||||||
int last_error = global_error;
|
|
||||||
@@ -142,7 +143,8 @@ dwfl_errmsg (error)
|
|
||||||
switch (error &~ 0xffff)
|
|
||||||
{
|
|
||||||
case OTHER_ERROR (ERRNO):
|
|
||||||
- return strerror_r (error & 0xffff, "bad", 0);
|
|
||||||
+ strerror_r (error & 0xffff, s, sizeof(s));
|
|
||||||
+ return s;
|
|
||||||
case OTHER_ERROR (LIBELF):
|
|
||||||
return elf_errmsg (error & 0xffff);
|
|
||||||
case OTHER_ERROR (LIBDW):
|
|
||||||
--- a/libdwfl/libdwfl.h
|
|
||||||
+++ b/libdwfl/libdwfl.h
|
|
||||||
@@ -31,6 +31,27 @@
|
|
||||||
|
|
||||||
#include "libdw.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#include <alloca.h>
|
|
||||||
+#include <string.h>
|
|
||||||
+
|
|
||||||
+#ifndef TEMP_FAILURE_RETRY
|
|
||||||
+#define TEMP_FAILURE_RETRY(expression) \
|
|
||||||
+ (__extension__ \
|
|
||||||
+ ({ long int __result; \
|
|
||||||
+ do __result = (long int) (expression); \
|
|
||||||
+ while (__result == -1L && errno == EINTR); \
|
|
||||||
+ __result; }))
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifndef strndupa
|
|
||||||
+#define strndupa(s, n) \
|
|
||||||
+ (__extension__ ({const char *__in = (s); \
|
|
||||||
+ size_t __len = strnlen (__in, (n)) + 1; \
|
|
||||||
+ char *__out = (char *) alloca (__len); \
|
|
||||||
+ __out[__len-1] = '\0'; \
|
|
||||||
+ (char *) memcpy (__out, __in, __len-1);}))
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Handle for a session using the library. */
|
|
||||||
typedef struct Dwfl Dwfl;
|
|
||||||
--- a/libdwfl/find-debuginfo.c
|
|
||||||
+++ b/libdwfl/find-debuginfo.c
|
|
||||||
@@ -338,7 +338,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul
|
|
||||||
/* If FILE_NAME is a symlink, the debug file might be associated
|
|
||||||
with the symlink target name instead. */
|
|
||||||
|
|
||||||
- char *canon = canonicalize_file_name (file_name);
|
|
||||||
+ char *canon = realpath (file_name, NULL);
|
|
||||||
if (canon != NULL && strcmp (file_name, canon))
|
|
||||||
fd = find_debuginfo_in_path (mod, canon,
|
|
||||||
debuglink_file, debuglink_crc,
|
|
||||||
--- a/libdwfl/dwfl_build_id_find_elf.c
|
|
||||||
+++ b/libdwfl/dwfl_build_id_find_elf.c
|
|
||||||
@@ -80,7 +80,7 @@ __libdwfl_open_by_build_id (Dwfl_Module
|
|
||||||
{
|
|
||||||
if (*file_name != NULL)
|
|
||||||
free (*file_name);
|
|
||||||
- *file_name = canonicalize_file_name (name);
|
|
||||||
+ *file_name = realpath (name, NULL);
|
|
||||||
if (*file_name == NULL)
|
|
||||||
{
|
|
||||||
*file_name = name;
|
|
||||||
--- a/libelf/elf_getarsym.c
|
|
||||||
+++ b/libelf/elf_getarsym.c
|
|
||||||
@@ -284,7 +284,7 @@ elf_getarsym (elf, ptr)
|
|
||||||
arsym[cnt].as_off = file_data->u32[cnt];
|
|
||||||
|
|
||||||
arsym[cnt].as_hash = _dl_elf_hash (str_data);
|
|
||||||
- str_data = rawmemchr (str_data, '\0') + 1;
|
|
||||||
+ str_data = memchr (str_data, '\0', SIZE_MAX) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* At the end a special entry. */
|
|
|
@ -1,109 +0,0 @@
|
||||||
--- a/libdwfl/argp-std.c
|
|
||||||
+++ b/libdwfl/argp-std.c
|
|
||||||
@@ -52,9 +52,6 @@ static const struct argp_option options[
|
|
||||||
{ "linux-process-map", 'M', "FILE", 0,
|
|
||||||
N_("Find addresses in files mapped as read from FILE"
|
|
||||||
" in Linux /proc/PID/maps format"), 0 },
|
|
||||||
- { "kernel", 'k', NULL, 0, N_("Find addresses in the running kernel"), 0 },
|
|
||||||
- { "offline-kernel", 'K', "RELEASE", OPTION_ARG_OPTIONAL,
|
|
||||||
- N_("Kernel with all modules"), 0 },
|
|
||||||
{ "debuginfo-path", OPT_DEBUGINFO, "PATH", 0,
|
|
||||||
N_("Search path for separate debuginfo files"), 0 },
|
|
||||||
{ NULL, 0, NULL, 0, NULL, 0 }
|
|
||||||
@@ -81,15 +78,6 @@ static const Dwfl_Callbacks proc_callbac
|
|
||||||
.find_elf = INTUSE(dwfl_linux_proc_find_elf),
|
|
||||||
};
|
|
||||||
|
|
||||||
-static const Dwfl_Callbacks kernel_callbacks =
|
|
||||||
- {
|
|
||||||
- .find_debuginfo = INTUSE(dwfl_standard_find_debuginfo),
|
|
||||||
- .debuginfo_path = &debuginfo_path,
|
|
||||||
-
|
|
||||||
- .find_elf = INTUSE(dwfl_linux_kernel_find_elf),
|
|
||||||
- .section_address = INTUSE(dwfl_linux_kernel_module_section_address),
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
/* Structure held at state->HOOK. */
|
|
||||||
struct parse_opt
|
|
||||||
{
|
|
||||||
@@ -219,43 +207,6 @@ parse_opt (int key, char *arg, struct ar
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
- case 'k':
|
|
||||||
- {
|
|
||||||
- struct parse_opt *opt = state->hook;
|
|
||||||
- if (opt->dwfl == NULL)
|
|
||||||
- {
|
|
||||||
- Dwfl *dwfl = INTUSE(dwfl_begin) (&kernel_callbacks);
|
|
||||||
- int result = INTUSE(dwfl_linux_kernel_report_kernel) (dwfl);
|
|
||||||
- if (result != 0)
|
|
||||||
- return fail (dwfl, result, _("cannot load kernel symbols"));
|
|
||||||
- result = INTUSE(dwfl_linux_kernel_report_modules) (dwfl);
|
|
||||||
- if (result != 0)
|
|
||||||
- /* Non-fatal to have no modules since we do have the kernel. */
|
|
||||||
- failure (dwfl, result, _("cannot find kernel modules"));
|
|
||||||
- opt->dwfl = dwfl;
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
- goto toomany;
|
|
||||||
- }
|
|
||||||
- break;
|
|
||||||
-
|
|
||||||
- case 'K':
|
|
||||||
- {
|
|
||||||
- struct parse_opt *opt = state->hook;
|
|
||||||
- if (opt->dwfl == NULL)
|
|
||||||
- {
|
|
||||||
- Dwfl *dwfl = INTUSE(dwfl_begin) (&offline_callbacks);
|
|
||||||
- int result = INTUSE(dwfl_linux_kernel_report_offline) (dwfl, arg,
|
|
||||||
- NULL);
|
|
||||||
- if (result != 0)
|
|
||||||
- return fail (dwfl, result, _("cannot find kernel or modules"));
|
|
||||||
- opt->dwfl = dwfl;
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
- goto toomany;
|
|
||||||
- }
|
|
||||||
- break;
|
|
||||||
-
|
|
||||||
case ARGP_KEY_SUCCESS:
|
|
||||||
{
|
|
||||||
struct parse_opt *opt = state->hook;
|
|
||||||
--- a/libdwfl/Makefile.in
|
|
||||||
+++ b/libdwfl/Makefile.in
|
|
||||||
@@ -113,7 +113,7 @@ am__libdwfl_a_SOURCES_DIST = dwfl_begin.
|
|
||||||
dwfl_getmodules.c dwfl_getdwarf.c dwfl_module_getdwarf.c \
|
|
||||||
dwfl_module_getelf.c dwfl_validate_address.c argp-std.c \
|
|
||||||
find-debuginfo.c dwfl_build_id_find_elf.c \
|
|
||||||
- dwfl_build_id_find_debuginfo.c linux-kernel-modules.c \
|
|
||||||
+ dwfl_build_id_find_debuginfo.c \
|
|
||||||
linux-proc-maps.c dwfl_addrmodule.c dwfl_addrdwarf.c cu.c \
|
|
||||||
dwfl_module_nextcu.c dwfl_nextcu.c dwfl_cumodule.c \
|
|
||||||
dwfl_module_addrdie.c dwfl_addrdie.c lines.c dwfl_lineinfo.c \
|
|
||||||
@@ -142,7 +142,7 @@ am_libdwfl_a_OBJECTS = dwfl_begin.$(OBJE
|
|
||||||
dwfl_validate_address.$(OBJEXT) argp-std.$(OBJEXT) \
|
|
||||||
find-debuginfo.$(OBJEXT) dwfl_build_id_find_elf.$(OBJEXT) \
|
|
||||||
dwfl_build_id_find_debuginfo.$(OBJEXT) \
|
|
||||||
- linux-kernel-modules.$(OBJEXT) linux-proc-maps.$(OBJEXT) \
|
|
||||||
+ linux-proc-maps.$(OBJEXT) \
|
|
||||||
dwfl_addrmodule.$(OBJEXT) dwfl_addrdwarf.$(OBJEXT) \
|
|
||||||
cu.$(OBJEXT) dwfl_module_nextcu.$(OBJEXT) \
|
|
||||||
dwfl_nextcu.$(OBJEXT) dwfl_cumodule.$(OBJEXT) \
|
|
||||||
@@ -402,7 +402,7 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en
|
|
||||||
dwfl_getmodules.c dwfl_getdwarf.c dwfl_module_getdwarf.c \
|
|
||||||
dwfl_module_getelf.c dwfl_validate_address.c argp-std.c \
|
|
||||||
find-debuginfo.c dwfl_build_id_find_elf.c \
|
|
||||||
- dwfl_build_id_find_debuginfo.c linux-kernel-modules.c \
|
|
||||||
+ dwfl_build_id_find_debuginfo.c \
|
|
||||||
linux-proc-maps.c dwfl_addrmodule.c dwfl_addrdwarf.c cu.c \
|
|
||||||
dwfl_module_nextcu.c dwfl_nextcu.c dwfl_cumodule.c \
|
|
||||||
dwfl_module_addrdie.c dwfl_addrdie.c lines.c dwfl_lineinfo.c \
|
|
||||||
@@ -540,7 +540,6 @@ distclean-compile:
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lines.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link_map.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux-core-attach.Po@am__quote@
|
|
||||||
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux-kernel-modules.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux-pid-attach.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux-proc-maps.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzma.Po@am__quote@
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=file
|
PKG_NAME:=file
|
||||||
PKG_VERSION:=5.20
|
PKG_VERSION:=5.25
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/file/
|
PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/file/
|
||||||
PKG_MD5SUM:=5d5e13eb3e0e13839da869a31790faf2
|
PKG_MD5SUM:=e6a972d4e10d9e76407a432f4a63cd4c
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-2c
|
PKG_LICENSE:=BSD-2c
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
@ -83,6 +83,9 @@ define Package/file/install
|
||||||
$(SED) "/^#/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
|
$(SED) "/^#/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
|
||||||
$(SED) "/^$$$$/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
|
$(SED) "/^$$$$/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
|
||||||
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/file/magic $(1)/usr/share/misc/
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/file/magic $(1)/usr/share/misc/
|
||||||
|
|
||||||
|
# For some reason both "magic" and "magic.mgc" MUST exist
|
||||||
|
ln -sf magic $(1)/usr/share/misc/magic.mgc
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libmagic/install
|
define Package/libmagic/install
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2005-2015 OpenWrt.org
|
# Copyright (C) 2005-2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,13 +8,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=gnutls
|
PKG_NAME:=gnutls
|
||||||
PKG_VERSION:=3.4.1
|
PKG_VERSION:=3.4.15
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4
|
PKG_SOURCE_URL:=ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4
|
||||||
PKG_MD5SUM:=2d04f34fa25b45f9dcb9104c0394e12e
|
PKG_MD5SUM:=4ea5b239bd8bf1b734dda02997b36459
|
||||||
#PKG_FIXUP:=autoreconf gettext-version
|
#PKG_FIXUP:=autoreconf gettext-version
|
||||||
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
|
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
|
||||||
PKG_LICENSE:=LGPLv2.1+
|
PKG_LICENSE:=LGPLv2.1+
|
||||||
|
|
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ldns
|
PKG_NAME:=ldns
|
||||||
PKG_VERSION:=1.6.17
|
PKG_VERSION:=1.6.17
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/ldns
|
PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/ldns
|
||||||
|
|
11
libs/ldns/patches/001-perl5-defined-array.patch
Normal file
11
libs/ldns/patches/001-perl5-defined-array.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/doc/doxyparse.pl
|
||||||
|
+++ b/doc/doxyparse.pl
|
||||||
|
@@ -273,7 +273,7 @@ foreach (keys %manpages) {
|
||||||
|
|
||||||
|
print MAN $MAN_MIDDLE;
|
||||||
|
|
||||||
|
- if (defined(@$also)) {
|
||||||
|
+ if (@$also) {
|
||||||
|
print MAN "\n.SH SEE ALSO\n\\fI";
|
||||||
|
print MAN join "\\fR, \\fI", @$also;
|
||||||
|
print MAN "\\fR.\nAnd ";
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2014 OpenWrt.org
|
# Copyright (C) 2006-2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -11,11 +11,9 @@ PKG_NAME:=audiofile
|
||||||
PKG_VERSION:=0.3.6
|
PKG_VERSION:=0.3.6
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:= \
|
PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/0.3
|
||||||
http://github.com/downloads/mpruett/audiofile/ \
|
PKG_MD5SUM:=235dde14742317328f0109e9866a8008
|
||||||
http://www.68k.org/~michael/audiofile/
|
|
||||||
PKG_MD5SUM:=2731d79bec0acef3d30d2fc86b0b72fd
|
|
||||||
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
|
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
|
|
|
@ -11,7 +11,8 @@ PKG_NAME:=libdaq
|
||||||
PKG_VERSION:=2.0.4
|
PKG_VERSION:=2.0.4
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/
|
PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
|
||||||
|
@SF/snort
|
||||||
PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz
|
||||||
PKG_MD5SUM:=65e51d72e9d5d8b397e192e4e5857eff
|
PKG_MD5SUM:=65e51d72e9d5d8b397e192e4e5857eff
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION)
|
||||||
|
|
|
@ -11,9 +11,9 @@ PKG_NAME:=libdnet
|
||||||
PKG_VERSION:=1.12
|
PKG_VERSION:=1.12
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://libdnet.googlecode.com/files/
|
PKG_SOURCE_URL:=https://github.com/dugsong/libdnet/archive
|
||||||
PKG_MD5SUM:=9253ef6de1b5e28e9c9a62b882e44cc9
|
PKG_MD5SUM:=d2f1b72eac2a1070959667e9e61dcf20
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
@ -21,6 +21,8 @@ PKG_INSTALL:=1
|
||||||
PKG_LICENSE:=BSD
|
PKG_LICENSE:=BSD
|
||||||
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
||||||
|
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/libdnet
|
define Package/libdnet
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008-2015 OpenWrt.org
|
# Copyright (C) 2008-2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -9,14 +9,16 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libesmtp
|
PKG_NAME:=libesmtp
|
||||||
PKG_VERSION:=1.0.6
|
PKG_VERSION:=1.0.6
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_MD5SUM:=c4fedc999b6c3820296b0eb92cc2e252
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
|
PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
|
||||||
PKG_LICENSE:=LGPL-2.0+
|
PKG_LICENSE:=LGPL-2.0+
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
||||||
PKG_SOURCE_URL:=http://www.stafford.uklinux.net/libesmtp
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/tru7/libesmtp.git
|
||||||
|
PKG_SOURCE_VERSION=10e9a6df9f76da610941addf71b9a3cbf94f2e9f
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
@ -28,13 +30,10 @@ define Package/libesmtp
|
||||||
SECTION:=libs
|
SECTION:=libs
|
||||||
CATEGORY:=Libraries
|
CATEGORY:=Libraries
|
||||||
TITLE:=A Library for Posting Electronic Mail
|
TITLE:=A Library for Posting Electronic Mail
|
||||||
URL:=http://www.stafford.uklinux.net/libesmtp/
|
URL:=https://github.com/tru7/libesmtp.git
|
||||||
DEPENDS:=+libpthread
|
DEPENDS:=+libpthread +libopenssl
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
|
||||||
--without-openssl
|
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libesmtp-config $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libesmtp-config $(1)/usr/bin/
|
||||||
|
|
57
libs/libev/Makefile
Normal file
57
libs/libev/Makefile
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2014-2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=libev
|
||||||
|
PKG_VERSION:=4.19
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/
|
||||||
|
PKG_MD5SUM:=01d1c672697f649b4f94abd0b70584ff
|
||||||
|
PKG_LICENSE:=BSD-2-Clause
|
||||||
|
PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au>
|
||||||
|
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_FIXUP:=autoreconf
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/libev
|
||||||
|
SECTION:=libs
|
||||||
|
CATEGORY:=Libraries
|
||||||
|
TITLE:=High-performance event loop
|
||||||
|
URL:=http://software.schmorp.de/pkg/libev.html
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libev/description
|
||||||
|
A full-featured and high-performance event loop that is loosely modelled after
|
||||||
|
libevent, but without its limitations and bugs.
|
||||||
|
endef
|
||||||
|
|
||||||
|
TARGET_CFLAGS += $(FPIC)
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-static \
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.{a,so*} $(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libev/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.so* $(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,libev))
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2014 OpenWrt.org
|
# Copyright (C) 2006-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,13 +8,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libevent
|
PKG_NAME:=libevent
|
||||||
PKG_VERSION:=1.4.14b
|
PKG_VERSION:=1.4.15
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-stable
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)-stable
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-stable.tar.gz
|
PKG_SOURCE:=release-$(PKG_VERSION)-stable.tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/downloads/libevent/libevent/
|
PKG_SOURCE_URL:=https://github.com/libevent/libevent/archive/
|
||||||
PKG_MD5SUM:=a00e037e4d3f9e4fe9893e8a2d27918c
|
PKG_MD5SUM:=6dce6fe39f133c09ffe63de895805f7f
|
||||||
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
|
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libidn
|
PKG_NAME:=libidn
|
||||||
PKG_VERSION:=1.30
|
PKG_VERSION:=1.32
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@GNU/libidn
|
PKG_SOURCE_URL:=@GNU/libidn
|
||||||
PKG_MD5SUM:=b17edc8551cd31cc5f14c82a9dabf58e
|
PKG_MD5SUM:=4dd8356ba577287ea7076bfa1554b534
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0+ GPL-3.0+ LGPL-2.1+ LGPL-3.0+ Apache-2.0
|
PKG_LICENSE:=GPL-2.0+ GPL-3.0+ LGPL-2.1+ LGPL-3.0+ Apache-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYINGv3 COPYING.LESSERv2 COPYING.LESSERv3 java/LICENSE-2.0.txt
|
PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYINGv3 COPYING.LESSERv2 COPYING.LESSERv3 java/LICENSE-2.0.txt
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libmpdclient
|
PKG_NAME:=libmpdclient
|
||||||
PKG_VERSION:=2.9
|
PKG_VERSION:=2.10
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=http://www.musicpd.org/download/libmpdclient/2/
|
PKG_SOURCE_URL:=http://www.musicpd.org/download/libmpdclient/2/
|
||||||
PGK_MD5SUM:=4b101a36e5c0cf967dc063391260ddbf
|
PGK_MD5SUM:=00606c630b905aa6196330373b366c29
|
||||||
|
|
||||||
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
|
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
PKG_LICENSE:=BSD-3-Clause
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
--- a/src/socket.c
|
|
||||||
+++ b/src/socket.c
|
|
||||||
@@ -43,6 +43,7 @@
|
|
||||||
#else
|
|
||||||
# include <netinet/in.h>
|
|
||||||
# include <arpa/inet.h>
|
|
||||||
+# include <sys/select.h>
|
|
||||||
# include <sys/socket.h>
|
|
||||||
# include <netdb.h>
|
|
||||||
# include <sys/un.h>
|
|
||||||
--- a/src/sync.c
|
|
||||||
+++ b/src/sync.c
|
|
||||||
@@ -33,6 +33,9 @@
|
|
||||||
#include <assert.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
+#ifndef WIN32
|
|
||||||
+#include <sys/select.h>
|
|
||||||
+#endif
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
51
libs/libmraa/Makefile
Normal file
51
libs/libmraa/Makefile
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=libmraa
|
||||||
|
PKG_VERSION:=0.8.0
|
||||||
|
|
||||||
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/mraa.git
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_SOURCE_VERSION:=70600dece4138b0c0dbaff42f57828f1559cd840
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
|
PKG_BUILD_DEPENDS:=node python/host swig/host node/host
|
||||||
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||||
|
PKG_LICENSE:=LGPL-2.1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
|
CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
|
||||||
|
-DENABLEEXAMPLES=0 \
|
||||||
|
-DNODE_EXECUTABLE=$(STAGING_DIR_HOST)/bin/node \
|
||||||
|
-DSWIG_DIR=$(STAGING_DIR_HOST)/bin
|
||||||
|
|
||||||
|
TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/node
|
||||||
|
|
||||||
|
define Package/libmraa
|
||||||
|
SECTION:=libs
|
||||||
|
CATEGORY:=Libraries
|
||||||
|
DEPENDS:=+python +libstdcpp
|
||||||
|
TITLE:=Intel IoT lowlevel IO library
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libmraa/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/{node/mraa,python2.7/site-packages} $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libmraa.so* $(1)/usr/lib/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/node_modules/mraa/* $(1)/usr/lib/node/mraa/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/* $(1)/usr/lib/python2.7/site-packages/
|
||||||
|
# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mraa/examples/python/blink-io8.py $(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,libmraa))
|
118
libs/libmraa/patches/0001-base.patch
Normal file
118
libs/libmraa/patches/0001-base.patch
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
From 6fecad819376442d057bdd35a0909cfac9df02f5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Crispin <blogic@openwrt.org>
|
||||||
|
Date: Thu, 23 Jul 2015 12:18:39 +0200
|
||||||
|
Subject: [PATCH 1/4] base
|
||||||
|
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 10 ++++------
|
||||||
|
api/mraa/types.h | 1 +
|
||||||
|
include/mraa_internal.h | 7 +++++++
|
||||||
|
src/CMakeLists.txt | 5 +++++
|
||||||
|
src/i2c/i2c.c | 2 +-
|
||||||
|
src/mraa.c | 3 +++
|
||||||
|
src/uart/uart.c | 1 +
|
||||||
|
7 files changed, 22 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -14,12 +14,7 @@
|
||||||
|
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
|
# Make a version file containing the current version from git.
|
||||||
|
-include (GetGitRevisionDescription)
|
||||||
|
-git_describe (VERSION "--tags")
|
||||||
|
-if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_HEAD-HASH-NOTFOUND")
|
||||||
|
- message (WARNING " - Install git to compile a production libmraa!")
|
||||||
|
- set (VERSION "v0.8.0-dirty")
|
||||||
|
-endif ()
|
||||||
|
+set (VERSION "v0.8.0")
|
||||||
|
|
||||||
|
message (INFO " - libmraa Version ${VERSION}")
|
||||||
|
|
||||||
|
@@ -84,8 +79,10 @@
|
||||||
|
set (X86PLAT ON)
|
||||||
|
elseif (DETECTED_ARCH MATCHES "arm.*")
|
||||||
|
set (ARMPLAT ON)
|
||||||
|
+elseif (DETECTED_ARCH MATCHES "mips")
|
||||||
|
+ set (MIPSPLAT ON)
|
||||||
|
else ()
|
||||||
|
- message(FATAL_ERROR "Only x86 and arm platforms currently supported")
|
||||||
|
+ message(FATAL_ERROR "Only x86, arm and mips platforms currently supported")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (BUILDSWIGPYTHON)
|
||||||
|
--- a/api/mraa/types.h
|
||||||
|
+++ b/api/mraa/types.h
|
||||||
|
@@ -46,6 +46,7 @@
|
||||||
|
MRAA_BEAGLEBONE = 6, /**< The different BeagleBone Black Modes B/C */
|
||||||
|
MRAA_BANANA = 7, /**< Allwinner A20 based Banana Pi and Banana Pro */
|
||||||
|
MRAA_INTEL_NUC5 = 8, /**< The Intel 5th generations Broadwell NUCs */
|
||||||
|
+ MRAA_MTK_LINKIT = 9, /**< Mediatek MT7688 based Linkit (Air) */
|
||||||
|
|
||||||
|
// USB platform extenders start at 256
|
||||||
|
MRAA_FTDI_FT4222 = 256, /**< FTDI FT4222 USB to i2c bridge */
|
||||||
|
--- a/include/mraa_internal.h
|
||||||
|
+++ b/include/mraa_internal.h
|
||||||
|
@@ -66,6 +66,13 @@
|
||||||
|
mraa_platform_t mraa_usb_platform_extender(mraa_board_t* board);
|
||||||
|
|
||||||
|
/**
|
||||||
|
+ * runtime detect running arm platforms
|
||||||
|
+ *
|
||||||
|
+ * @return mraa_platform_t of the init'ed platform
|
||||||
|
+ */
|
||||||
|
+mraa_platform_t mraa_mips_platform();
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
* helper function to check if file exists
|
||||||
|
*
|
||||||
|
* @param filename to check
|
||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -71,6 +71,11 @@
|
||||||
|
add_subdirectory(usb)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
+if (MIPSPLAT)
|
||||||
|
+ add_subdirectory(mips)
|
||||||
|
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMIPSPLAT=1")
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
set (mraa_LIB_SRCS
|
||||||
|
${mraa_LIB_PLAT_SRCS_NOAUTO}
|
||||||
|
# autogenerated version file
|
||||||
|
--- a/src/i2c/i2c.c
|
||||||
|
+++ b/src/i2c/i2c.c
|
||||||
|
@@ -31,9 +31,9 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
+#include <errno.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
-#include <sys/errno.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include "linux/i2c-dev.h"
|
||||||
|
|
||||||
|
--- a/src/mraa.c
|
||||||
|
+++ b/src/mraa.c
|
||||||
|
@@ -111,6 +111,9 @@
|
||||||
|
#elif defined(ARMPLAT)
|
||||||
|
// Use runtime ARM platform detection
|
||||||
|
platform_type = mraa_arm_platform();
|
||||||
|
+#elif MIPSPLAT
|
||||||
|
+ // Use runtime ARM platform detection
|
||||||
|
+ platform_type = mraa_mips_platform();
|
||||||
|
#else
|
||||||
|
#error mraa_ARCH NOTHING
|
||||||
|
#endif
|
||||||
|
--- a/src/uart/uart.c
|
||||||
|
+++ b/src/uart/uart.c
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
+#include <sys/time.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <termios.h>
|
483
libs/libmraa/patches/0002-add-mips-support.patch
Normal file
483
libs/libmraa/patches/0002-add-mips-support.patch
Normal file
|
@ -0,0 +1,483 @@
|
||||||
|
From 2c67c6f51ce5bab18c79f4304ccf42716f59f13c Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Crispin <blogic@openwrt.org>
|
||||||
|
Date: Thu, 23 Jul 2015 13:21:25 +0200
|
||||||
|
Subject: [PATCH 2/4] add mips support
|
||||||
|
|
||||||
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||||
|
---
|
||||||
|
include/mips/mediatek.h | 39 ++++++
|
||||||
|
src/mips/CMakeLists.txt | 6 +
|
||||||
|
src/mips/mediatek.c | 349 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
src/mips/mips.c | 60 ++++++++
|
||||||
|
4 files changed, 454 insertions(+)
|
||||||
|
create mode 100644 include/mips/mediatek.h
|
||||||
|
create mode 100644 src/mips/CMakeLists.txt
|
||||||
|
create mode 100644 src/mips/mediatek.c
|
||||||
|
create mode 100644 src/mips/mips.c
|
||||||
|
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/include/mips/mediatek.h
|
||||||
|
@@ -0,0 +1,39 @@
|
||||||
|
+/*
|
||||||
|
+ * Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
|
||||||
|
+ * Author: Michael Ring <mail@michael-ring.org>
|
||||||
|
+ * Copyright (c) 2014 Intel Corporation.
|
||||||
|
+ *
|
||||||
|
+ * Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
+ * a copy of this software and associated documentation files (the
|
||||||
|
+ * "Software"), to deal in the Software without restriction, including
|
||||||
|
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
+ * distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
+ * the following conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#pragma once
|
||||||
|
+
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+extern "C" {
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#include "mraa_internal.h"
|
||||||
|
+
|
||||||
|
+mraa_board_t *
|
||||||
|
+ mraa_mtk_linkit();
|
||||||
|
+
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/mips/CMakeLists.txt
|
||||||
|
@@ -0,0 +1,6 @@
|
||||||
|
+message (INFO " - Adding MIPS platforms")
|
||||||
|
+set (mraa_LIB_PLAT_SRCS_NOAUTO ${mraa_LIB_SRCS_NOAUTO}
|
||||||
|
+ ${PROJECT_SOURCE_DIR}/src/mips/mips.c
|
||||||
|
+ ${PROJECT_SOURCE_DIR}/src/mips/mediatek.c
|
||||||
|
+ PARENT_SCOPE
|
||||||
|
+)
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/mips/mediatek.c
|
||||||
|
@@ -0,0 +1,349 @@
|
||||||
|
+/*
|
||||||
|
+ * Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
|
||||||
|
+ * Author: Michael Ring <mail@michael-ring.org>
|
||||||
|
+ * Copyright (c) 2014 Intel Corporation.
|
||||||
|
+ *
|
||||||
|
+ * Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
+ * a copy of this software and associated documentation files (the
|
||||||
|
+ * "Software"), to deal in the Software without restriction, including
|
||||||
|
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
+ * distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
+ * the following conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <stdint.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+#include <sys/mman.h>
|
||||||
|
+#include <mraa/common.h>
|
||||||
|
+
|
||||||
|
+#include "mraa_internal.h"
|
||||||
|
+
|
||||||
|
+#include "common.h"
|
||||||
|
+
|
||||||
|
+#define PLATFORM_MEDIATEK_LINKIT 1
|
||||||
|
+#define PLATFORM_MEDIATEK_LINKIT_AIR 2
|
||||||
|
+#define MMAP_PATH "/dev/mem"
|
||||||
|
+#define MT7628_GPIO_BASE 0x100
|
||||||
|
+#define MT7628_BLOCK_SIZE (4 * 1024)
|
||||||
|
+#define MT7628_GPIO_CTRL 0x00
|
||||||
|
+#define MT7628_GPIO_DATA 0x20
|
||||||
|
+#define MT7628_GPIO_SET 0x30
|
||||||
|
+#define MT7628_GPIO_CLEAR 0x40
|
||||||
|
+
|
||||||
|
+#define MAX_SIZE 64
|
||||||
|
+
|
||||||
|
+// MMAP
|
||||||
|
+static uint8_t* mmap_reg = NULL;
|
||||||
|
+static int mmap_fd = 0;
|
||||||
|
+static int mmap_size;
|
||||||
|
+static unsigned int mmap_count = 0;
|
||||||
|
+static int platform_detected = 0;
|
||||||
|
+
|
||||||
|
+mraa_result_t
|
||||||
|
+mraa_mtk_linkit_mmap_write(mraa_gpio_context dev, int value)
|
||||||
|
+{
|
||||||
|
+ volatile uint32_t* addr;
|
||||||
|
+ if (value) {
|
||||||
|
+ *(volatile uint32_t*) (mmap_reg + MT7628_GPIO_SET + (dev->pin / 32) * 4) =
|
||||||
|
+ (uint32_t)(1 << (dev->pin % 32));
|
||||||
|
+ } else {
|
||||||
|
+ *(volatile uint32_t*) (mmap_reg + MT7628_GPIO_CLEAR + (dev->pin / 32) * 4) =
|
||||||
|
+ (uint32_t)(1 << (dev->pin % 32));
|
||||||
|
+ }
|
||||||
|
+ return MRAA_SUCCESS;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static mraa_result_t
|
||||||
|
+mraa_mtk_linkit_mmap_unsetup()
|
||||||
|
+{
|
||||||
|
+ if (mmap_reg == NULL) {
|
||||||
|
+ syslog(LOG_ERR, "linkit mmap: null register cant unsetup");
|
||||||
|
+ return MRAA_ERROR_INVALID_RESOURCE;
|
||||||
|
+ }
|
||||||
|
+ munmap(mmap_reg, mmap_size);
|
||||||
|
+ mmap_reg = NULL;
|
||||||
|
+ if (close(mmap_fd) != 0) {
|
||||||
|
+ return MRAA_ERROR_INVALID_RESOURCE;
|
||||||
|
+ }
|
||||||
|
+ return MRAA_SUCCESS;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+mraa_mtk_linkit_mmap_read(mraa_gpio_context dev)
|
||||||
|
+{
|
||||||
|
+ uint32_t value = *(volatile uint32_t*) (mmap_reg + MT7628_GPIO_DATA + (dev->pin / 32) * 4);
|
||||||
|
+ if (value & (uint32_t)(1 << (dev->pin % 32))) {
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+mraa_result_t
|
||||||
|
+mraa_mtk_linkit_mmap_setup(mraa_gpio_context dev, mraa_boolean_t en)
|
||||||
|
+{
|
||||||
|
+ if (dev == NULL) {
|
||||||
|
+ syslog(LOG_ERR, "linkit mmap: context not valid");
|
||||||
|
+ return MRAA_ERROR_INVALID_HANDLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (en == 0) {
|
||||||
|
+ if (dev->mmap_write == NULL && dev->mmap_read == NULL) {
|
||||||
|
+ syslog(LOG_ERR, "linkit mmap: can't disable disabled mmap gpio");
|
||||||
|
+ return MRAA_ERROR_INVALID_PARAMETER;
|
||||||
|
+ }
|
||||||
|
+ dev->mmap_write = NULL;
|
||||||
|
+ dev->mmap_read = NULL;
|
||||||
|
+ mmap_count--;
|
||||||
|
+ if (mmap_count == 0) {
|
||||||
|
+ return mraa_mtk_linkit_mmap_unsetup();
|
||||||
|
+ }
|
||||||
|
+ return MRAA_SUCCESS;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (dev->mmap_write != NULL && dev->mmap_read != NULL) {
|
||||||
|
+ syslog(LOG_ERR, "linkit mmap: can't enable enabled mmap gpio");
|
||||||
|
+ return MRAA_ERROR_INVALID_PARAMETER;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // Might need to make some elements of this thread safe.
|
||||||
|
+ // For example only allow one thread to enter the following block
|
||||||
|
+ // to prevent mmap'ing twice.
|
||||||
|
+ if (mmap_reg == NULL) {
|
||||||
|
+ if ((mmap_fd = open(MMAP_PATH, O_RDWR)) < 0) {
|
||||||
|
+ syslog(LOG_ERR, "linkit map: unable to open resource0 file");
|
||||||
|
+ return MRAA_ERROR_INVALID_HANDLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ mmap_reg = (uint8_t*) mmap(NULL, MT7628_BLOCK_SIZE, PROT_READ | PROT_WRITE,
|
||||||
|
+ MAP_FILE | MAP_SHARED, mmap_fd, MT7628_GPIO_BASE);
|
||||||
|
+ if (mmap_reg == MAP_FAILED) {
|
||||||
|
+ syslog(LOG_ERR, "linkit mmap: failed to mmap");
|
||||||
|
+ mmap_reg = NULL;
|
||||||
|
+ close(mmap_fd);
|
||||||
|
+ return MRAA_ERROR_NO_RESOURCES;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ dev->mmap_write = &mraa_mtk_linkit_mmap_write;
|
||||||
|
+ dev->mmap_read = &mraa_mtk_linkit_mmap_read;
|
||||||
|
+ mmap_count++;
|
||||||
|
+
|
||||||
|
+ return MRAA_SUCCESS;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+mraa_board_t*
|
||||||
|
+mraa_mtk_linkit()
|
||||||
|
+{
|
||||||
|
+ mraa_board_t* b = (mraa_board_t*) malloc(sizeof(mraa_board_t));
|
||||||
|
+ if (b == NULL) {
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ b->platform_name = "LINKIT";
|
||||||
|
+ platform_detected = PLATFORM_MEDIATEK_LINKIT;
|
||||||
|
+ b->phy_pin_count = 31;
|
||||||
|
+
|
||||||
|
+ b->aio_count = 0;
|
||||||
|
+ b->adc_raw = 0;
|
||||||
|
+ b->adc_supported = 0;
|
||||||
|
+ b->pwm_default_period = 500;
|
||||||
|
+ b->pwm_max_period = 2147483;
|
||||||
|
+ b->pwm_min_period = 1;
|
||||||
|
+
|
||||||
|
+ b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count);
|
||||||
|
+
|
||||||
|
+ advance_func->gpio_mmap_setup = &mraa_mtk_linkit_mmap_setup;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[0].name, "P0", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[0].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[1].name, "P1", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[1].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[2].name, "P2", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[2].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[3].name, "P3", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[3].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[4].name, "P4", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[4].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[5].name, "P5", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[5].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[6].name, "P6", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[6].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[7].name, "P7", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[7].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[8].name, "P8", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[8].gpio.pinmap = 21;
|
||||||
|
+ b->pins[8].uart.parent_id = 2;
|
||||||
|
+ b->pins[8].uart.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[9].name, "P9", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[9].gpio.pinmap = 20;
|
||||||
|
+ b->pins[9].uart.parent_id = 2;
|
||||||
|
+ b->pins[9].uart.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[10].name, "P10", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[10].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[10].gpio.pinmap = 2;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[11].name, "P11", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[11].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[11].gpio.pinmap = 3;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[12].name, "P12", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[12].gpio.pinmap = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[13].name, "P13", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[13].gpio.pinmap = 1;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[14].name, "P14", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[14].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[15].name, "P15", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[15].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[15].gpio.pinmap = 44;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[16].name, "P16", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[16].gpio.pinmap = 46;
|
||||||
|
+ b->pins[16].uart.parent_id = 1;
|
||||||
|
+ b->pins[16].uart.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[17].name, "P17", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[17].gpio.pinmap = 45;
|
||||||
|
+ b->pins[17].uart.parent_id = 1;
|
||||||
|
+ b->pins[17].uart.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[18].name, "P18", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[18].gpio.pinmap = 13;
|
||||||
|
+ b->pins[18].uart.parent_id = 1;
|
||||||
|
+ b->pins[18].uart.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[19].name, "P19", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[19].gpio.pinmap = 12;
|
||||||
|
+ b->pins[19].uart.parent_id = 0;
|
||||||
|
+ b->pins[19].uart.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[20].name, "P20", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
|
||||||
|
+ b->pins[20].gpio.pinmap = 5;
|
||||||
|
+ b->pins[20].i2c.pinmap = 0;
|
||||||
|
+ b->pins[20].i2c.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[21].name, "P21", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
|
||||||
|
+ b->pins[21].gpio.pinmap = 4;
|
||||||
|
+ b->pins[21].i2c.pinmap = 0;
|
||||||
|
+ b->pins[21].i2c.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[22].name, "P22", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[22].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
|
||||||
|
+ b->pins[22].gpio.pinmap = 8;
|
||||||
|
+ b->pins[22].spi.pinmap = 0;
|
||||||
|
+ b->pins[22].spi.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[23].name, "P23", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[23].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
|
||||||
|
+ b->pins[23].gpio.pinmap = 9;
|
||||||
|
+ b->pins[23].spi.pinmap = 0;
|
||||||
|
+ b->pins[23].spi.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[24].name, "P24", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[24].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
|
||||||
|
+ b->pins[24].gpio.pinmap = 7;
|
||||||
|
+ b->pins[24].spi.pinmap = 0;
|
||||||
|
+ b->pins[24].spi.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[25].name, "P25", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[25].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
|
||||||
|
+ b->pins[25].gpio.pinmap = 6;
|
||||||
|
+ b->pins[25].spi.pinmap = 0;
|
||||||
|
+ b->pins[25].spi.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[26].name, "P26", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[26].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[26].gpio.pinmap = 18;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[27].name, "P27", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[27].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[27].gpio.pinmap = 19;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[28].name, "P28", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[28].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[28].gpio.pinmap = 16;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[29].name, "P29", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[29].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[29].gpio.pinmap = 17;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[30].name, "P30", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[30].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[30].gpio.pinmap = 14;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[31].name, "P31", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[31].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[31].gpio.pinmap = 15;
|
||||||
|
+
|
||||||
|
+ // BUS DEFINITIONS
|
||||||
|
+ b->i2c_bus_count = 1;
|
||||||
|
+ b->def_i2c_bus = 0;
|
||||||
|
+ b->i2c_bus[0].bus_id = 0;
|
||||||
|
+ b->i2c_bus[0].sda = 20;
|
||||||
|
+ b->i2c_bus[0].scl = 21;
|
||||||
|
+
|
||||||
|
+ b->spi_bus_count = 1;
|
||||||
|
+ b->def_spi_bus = 0;
|
||||||
|
+ b->spi_bus[0].bus_id = 0;
|
||||||
|
+ b->spi_bus[0].slave_s = 0;
|
||||||
|
+ b->spi_bus[0].cs = 25;
|
||||||
|
+ b->spi_bus[0].mosi = 22;
|
||||||
|
+ b->spi_bus[0].miso = 23;
|
||||||
|
+ b->spi_bus[0].sclk = 21;
|
||||||
|
+
|
||||||
|
+ b->uart_dev_count = 3;
|
||||||
|
+ b->def_uart_dev = 0;
|
||||||
|
+ b->uart_dev[0].rx = 18;
|
||||||
|
+ b->uart_dev[0].tx = 19;
|
||||||
|
+
|
||||||
|
+ b->uart_dev[1].rx = 16;
|
||||||
|
+ b->uart_dev[1].tx = 17;
|
||||||
|
+
|
||||||
|
+ b->uart_dev[2].rx = 9;
|
||||||
|
+ b->uart_dev[2].tx = 8;
|
||||||
|
+
|
||||||
|
+ b->gpio_count = 0;
|
||||||
|
+ int i;
|
||||||
|
+ for (i = 0; i < b->phy_pin_count; i++) {
|
||||||
|
+ if (b->pins[i].capabilites.gpio) {
|
||||||
|
+ b->gpio_count++;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return b;
|
||||||
|
+}
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/mips/mips.c
|
||||||
|
@@ -0,0 +1,60 @@
|
||||||
|
+/*
|
||||||
|
+ * Author: Thomas Ingleby <thomas.c.ingleby@intel.com>
|
||||||
|
+ * Author: Michael Ring <mail@michael-ring.org>
|
||||||
|
+ * Copyright (c) 2014 Intel Corporation.
|
||||||
|
+ *
|
||||||
|
+ * Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
+ * a copy of this software and associated documentation files (the
|
||||||
|
+ * "Software"), to deal in the Software without restriction, including
|
||||||
|
+ * without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
+ * distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
+ * permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
+ * the following conditions:
|
||||||
|
+ *
|
||||||
|
+ * The above copyright notice and this permission notice shall be
|
||||||
|
+ * included in all copies or substantial portions of the Software.
|
||||||
|
+ *
|
||||||
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+
|
||||||
|
+#include "mraa_internal.h"
|
||||||
|
+#include "mips/mediatek.h"
|
||||||
|
+
|
||||||
|
+mraa_platform_t
|
||||||
|
+mraa_mips_platform()
|
||||||
|
+{
|
||||||
|
+ mraa_platform_t platform_type = MRAA_UNKNOWN_PLATFORM;
|
||||||
|
+ size_t len = 100;
|
||||||
|
+ char* line = malloc(len);
|
||||||
|
+ FILE* fh = fopen("/proc/cpuinfo", "r");
|
||||||
|
+ if (fh != NULL) {
|
||||||
|
+ while (getline(&line, &len, fh) != -1) {
|
||||||
|
+ if (strncmp(line, "machine", 7) == 0) {
|
||||||
|
+ if (strstr(line, "MediaTek LinkIt Smart 7688")) {
|
||||||
|
+ platform_type = MRAA_MTK_LINKIT;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ fclose(fh);
|
||||||
|
+ }
|
||||||
|
+ free(line);
|
||||||
|
+
|
||||||
|
+ switch (platform_type) {
|
||||||
|
+ case MRAA_MTK_LINKIT:
|
||||||
|
+ plat = mraa_mtk_linkit();
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ plat = NULL;
|
||||||
|
+ syslog(LOG_ERR, "Unknown Platform, currently not supported by MRAA");
|
||||||
|
+ }
|
||||||
|
+ return platform_type;
|
||||||
|
+}
|
26
libs/libmraa/patches/0003-uart.patch
Normal file
26
libs/libmraa/patches/0003-uart.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
From 9540f9b93704e8e80ab2048954ca88d8e6eddf86 Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Crispin <blogic@openwrt.org>
|
||||||
|
Date: Thu, 23 Jul 2015 16:43:42 +0200
|
||||||
|
Subject: [PATCH 3/4] uart
|
||||||
|
|
||||||
|
---
|
||||||
|
src/uart/uart.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/uart/uart.c b/src/uart/uart.c
|
||||||
|
index 3ef55a4..5102f81 100644
|
||||||
|
--- a/src/uart/uart.c
|
||||||
|
+++ b/src/uart/uart.c
|
||||||
|
@@ -34,6 +34,9 @@
|
||||||
|
#include "uart.h"
|
||||||
|
#include "mraa_internal.h"
|
||||||
|
|
||||||
|
+#ifndef CMSPAR
|
||||||
|
+#define CMSPAR 010000000000
|
||||||
|
+#endif
|
||||||
|
// This function takes an unsigned int and converts it to a B* speed_t
|
||||||
|
// that can be used with linux/posix termios
|
||||||
|
static speed_t
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
666
libs/libmraa/patches/0004-fixes.patch
Normal file
666
libs/libmraa/patches/0004-fixes.patch
Normal file
|
@ -0,0 +1,666 @@
|
||||||
|
From 3c34e5f87a741ec2fc7809fc8c169a832275d32c Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Crispin <blogic@openwrt.org>
|
||||||
|
Date: Thu, 23 Jul 2015 18:19:32 +0200
|
||||||
|
Subject: [PATCH 4/4] fixes
|
||||||
|
|
||||||
|
---
|
||||||
|
src/mips/mediatek.c | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/src/mips/mediatek.c
|
||||||
|
+++ b/src/mips/mediatek.c
|
||||||
|
@@ -37,12 +37,12 @@
|
||||||
|
#define PLATFORM_MEDIATEK_LINKIT 1
|
||||||
|
#define PLATFORM_MEDIATEK_LINKIT_AIR 2
|
||||||
|
#define MMAP_PATH "/dev/mem"
|
||||||
|
-#define MT7628_GPIO_BASE 0x100
|
||||||
|
-#define MT7628_BLOCK_SIZE (4 * 1024)
|
||||||
|
-#define MT7628_GPIO_CTRL 0x00
|
||||||
|
-#define MT7628_GPIO_DATA 0x20
|
||||||
|
-#define MT7628_GPIO_SET 0x30
|
||||||
|
-#define MT7628_GPIO_CLEAR 0x40
|
||||||
|
+#define MT7628_GPIOMODE_BASE 0x10000000
|
||||||
|
+#define MT7628_BLOCK_SIZE 0x1000
|
||||||
|
+#define MT7628_GPIO_CTRL 0x600
|
||||||
|
+#define MT7628_GPIO_DATA 0x620
|
||||||
|
+#define MT7628_GPIO_SET 0x630
|
||||||
|
+#define MT7628_GPIO_CLEAR 0x640
|
||||||
|
|
||||||
|
#define MAX_SIZE 64
|
||||||
|
|
||||||
|
@@ -50,6 +50,9 @@
|
||||||
|
static uint8_t* mmap_reg = NULL;
|
||||||
|
static int mmap_fd = 0;
|
||||||
|
static int mmap_size;
|
||||||
|
+static uint8_t* gpio_mmap_reg = NULL;
|
||||||
|
+static int gpio_mmap_fd = 0;
|
||||||
|
+static int gpio_mmap_size;
|
||||||
|
static unsigned int mmap_count = 0;
|
||||||
|
static int platform_detected = 0;
|
||||||
|
|
||||||
|
@@ -129,9 +132,10 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
mmap_reg = (uint8_t*) mmap(NULL, MT7628_BLOCK_SIZE, PROT_READ | PROT_WRITE,
|
||||||
|
- MAP_FILE | MAP_SHARED, mmap_fd, MT7628_GPIO_BASE);
|
||||||
|
+ MAP_FILE | MAP_SHARED, mmap_fd, 0x10000000);
|
||||||
|
if (mmap_reg == MAP_FAILED) {
|
||||||
|
- syslog(LOG_ERR, "linkit mmap: failed to mmap");
|
||||||
|
+ perror("foo");
|
||||||
|
+ syslog(LOG_ERR, "linkit mmap: failed to mmap");
|
||||||
|
mmap_reg = NULL;
|
||||||
|
close(mmap_fd);
|
||||||
|
return MRAA_ERROR_NO_RESOURCES;
|
||||||
|
@@ -144,201 +148,442 @@
|
||||||
|
return MRAA_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int mmap_gpiomode(void)
|
||||||
|
+{
|
||||||
|
+ if ((gpio_mmap_fd = open(MMAP_PATH, O_RDWR)) < 0) {
|
||||||
|
+ syslog(LOG_ERR, "linkit map: unable to open resource0 file");
|
||||||
|
+ return MRAA_ERROR_INVALID_HANDLE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ gpio_mmap_reg = (uint8_t*) mmap(NULL, MT7628_BLOCK_SIZE, PROT_READ | PROT_WRITE,
|
||||||
|
+ MAP_FILE | MAP_SHARED, gpio_mmap_fd, MT7628_GPIOMODE_BASE);
|
||||||
|
+ if (gpio_mmap_reg == MAP_FAILED) {
|
||||||
|
+ syslog(LOG_ERR, "linkit gpio_mmap: failed to mmap");
|
||||||
|
+ gpio_mmap_reg = NULL;
|
||||||
|
+ close(gpio_mmap_fd);
|
||||||
|
+ return MRAA_ERROR_NO_RESOURCES;
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void set_gpiomode(unsigned int mask, unsigned int shift, unsigned int val)
|
||||||
|
+{
|
||||||
|
+ unsigned int reg;
|
||||||
|
+ unsigned int offset = 0x60;
|
||||||
|
+
|
||||||
|
+ if (shift >= 32) {
|
||||||
|
+ shift -= 32;
|
||||||
|
+ offset += 4;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ reg = *(volatile uint32_t*) (gpio_mmap_reg + offset);
|
||||||
|
+
|
||||||
|
+ reg &= ~(mask << shift);
|
||||||
|
+ reg |= (val << shift);
|
||||||
|
+ *(volatile uint32_t*) (gpio_mmap_reg + offset) = reg;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+enum {
|
||||||
|
+ MUX_GPIO = 0,
|
||||||
|
+ MUX_SPI_S,
|
||||||
|
+ MUX_SPI_CS1,
|
||||||
|
+ MUX_I2S,
|
||||||
|
+ MUX_UART0,
|
||||||
|
+ MUX_I2C,
|
||||||
|
+ MUX_UART1,
|
||||||
|
+ MUX_UART2,
|
||||||
|
+ MUX_PWM0,
|
||||||
|
+ MUX_PWM1,
|
||||||
|
+ MUX_EPHY,
|
||||||
|
+ MUX_WLED,
|
||||||
|
+ __MUX_MAX,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static unsigned char gpio_mux_groups[64];
|
||||||
|
+static struct pinmux {
|
||||||
|
+ char *name;
|
||||||
|
+ char *func[4];
|
||||||
|
+ unsigned int shift;
|
||||||
|
+ unsigned int mask;
|
||||||
|
+} mt7688_mux[] = {
|
||||||
|
+ {
|
||||||
|
+ .name = "refclk",
|
||||||
|
+ .func = { "refclk", "gpio", NULL, NULL },
|
||||||
|
+ .shift = 18,
|
||||||
|
+ .mask = 0x1,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "spi_s",
|
||||||
|
+ .func = { "spi_s", "gpio", "utif", "pwm" },
|
||||||
|
+ .shift = 2,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "spi_cs1",
|
||||||
|
+ .func = { "spi_cs1", "gpio", NULL, "refclk" },
|
||||||
|
+ .shift = 4,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "i2s",
|
||||||
|
+ .func = { "i2s", "gpio", "pcm", NULL },
|
||||||
|
+ .shift = 6,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "uart0",
|
||||||
|
+ .func = { "uart", "gpio", NULL, NULL },
|
||||||
|
+ .shift = 8,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "i2c",
|
||||||
|
+ .func = { "i2c", "gpio", NULL, NULL },
|
||||||
|
+ .shift = 20,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "uart1",
|
||||||
|
+ .func = { "uart", "gpio", NULL, NULL },
|
||||||
|
+ .shift = 24,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "uart2",
|
||||||
|
+ .func = { "uart", "gpio", "pwm", NULL },
|
||||||
|
+ .shift = 26,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "pwm0",
|
||||||
|
+ .func = { "pwm", "gpio", NULL, NULL },
|
||||||
|
+ .shift = 28,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "pwm1",
|
||||||
|
+ .func = { "pwm", "gpio", NULL, NULL },
|
||||||
|
+ .shift = 30,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "ephy",
|
||||||
|
+ .func = { "ephy", "gpio", NULL, NULL },
|
||||||
|
+ .shift = 34,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ }, {
|
||||||
|
+ .name = "wled",
|
||||||
|
+ .func = { "wled", "gpio", NULL, NULL },
|
||||||
|
+ .shift = 32,
|
||||||
|
+ .mask = 0x3,
|
||||||
|
+ },
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+mraa_result_t gpio_init_pre(int pin)
|
||||||
|
+{
|
||||||
|
+ struct pinmux *m = &mt7688_mux[gpio_mux_groups[pin]];
|
||||||
|
+
|
||||||
|
+ set_gpiomode(m->mask, m->shift, 1);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void gpiomode_set(unsigned int id, char *name)
|
||||||
|
+{
|
||||||
|
+ int i;
|
||||||
|
+
|
||||||
|
+ if (id >= __MUX_MAX)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < 4; i++) {
|
||||||
|
+ if (!mt7688_mux[id].func[i] || strcmp(mt7688_mux[id].func[i], name))
|
||||||
|
+ continue;
|
||||||
|
+ set_gpiomode(mt7688_mux[id].mask, mt7688_mux[id].shift, i);
|
||||||
|
+ syslog(0, "mraa: set pinmux %s -> %s\n", mt7688_mux[id].name, name);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+mraa_result_t i2c_init_pre(unsigned int bus)
|
||||||
|
+{
|
||||||
|
+ gpiomode_set(MUX_I2C, "i2c");
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+mraa_result_t
|
||||||
|
+pwm_init_post(mraa_pwm_context pwm)
|
||||||
|
+{
|
||||||
|
+ switch(pwm->pin) {
|
||||||
|
+ case 0:
|
||||||
|
+ gpiomode_set(MUX_PWM0, "pwm");
|
||||||
|
+ break;
|
||||||
|
+ case 1:
|
||||||
|
+ gpiomode_set(MUX_PWM1, "pwm");
|
||||||
|
+ break;
|
||||||
|
+ case 2:
|
||||||
|
+ case 3:
|
||||||
|
+ gpiomode_set(MUX_UART2, "pwm");
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+mraa_result_t spi_init_pre(int bus)
|
||||||
|
+{
|
||||||
|
+ gpiomode_set(MUX_SPI_CS1, "spi_cs1");
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+mraa_result_t uart_init_pre(int index)
|
||||||
|
+{
|
||||||
|
+ switch(index) {
|
||||||
|
+ case 0:
|
||||||
|
+ gpiomode_set(MUX_UART0, "uart");
|
||||||
|
+ break;
|
||||||
|
+ case 1:
|
||||||
|
+ gpiomode_set(MUX_UART1, "uart");
|
||||||
|
+ break;
|
||||||
|
+ case 2:
|
||||||
|
+ gpiomode_set(MUX_UART2, "uart");
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+mraa_result_t
|
||||||
|
+i2c_freq(mraa_i2c_context dev, mraa_i2c_mode_t mode)
|
||||||
|
+{
|
||||||
|
+ switch (mode) {
|
||||||
|
+ case MRAA_I2C_STD:
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ syslog(LOG_ERR, "Invalid i2c frequency");
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ return MRAA_SUCCESS;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
mraa_board_t*
|
||||||
|
mraa_mtk_linkit()
|
||||||
|
{
|
||||||
|
+ int i;
|
||||||
|
+
|
||||||
|
+ if (mmap_gpiomode())
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
mraa_board_t* b = (mraa_board_t*) malloc(sizeof(mraa_board_t));
|
||||||
|
if (b == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- b->platform_name = "LINKIT";
|
||||||
|
+ memset(b, 0, sizeof(mraa_board_t));
|
||||||
|
+
|
||||||
|
+ b->platform_name = "LinkIt Smart 7688";
|
||||||
|
platform_detected = PLATFORM_MEDIATEK_LINKIT;
|
||||||
|
- b->phy_pin_count = 31;
|
||||||
|
+ b->phy_pin_count = 64;
|
||||||
|
|
||||||
|
b->aio_count = 0;
|
||||||
|
b->adc_raw = 0;
|
||||||
|
b->adc_supported = 0;
|
||||||
|
b->pwm_default_period = 500;
|
||||||
|
- b->pwm_max_period = 2147483;
|
||||||
|
+ b->pwm_max_period = 1000000;
|
||||||
|
b->pwm_min_period = 1;
|
||||||
|
|
||||||
|
- b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count);
|
||||||
|
-
|
||||||
|
- advance_func->gpio_mmap_setup = &mraa_mtk_linkit_mmap_setup;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[0].name, "P0", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[0].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[1].name, "P1", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[1].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[2].name, "P2", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[2].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[3].name, "P3", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[3].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[4].name, "P4", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[4].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[5].name, "P5", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[5].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[6].name, "P6", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[6].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[7].name, "P7", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[7].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[8].name, "P8", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
- b->pins[8].gpio.pinmap = 21;
|
||||||
|
- b->pins[8].uart.parent_id = 2;
|
||||||
|
- b->pins[8].uart.mux_total = 0;
|
||||||
|
+ b->adv_func = (mraa_adv_func_t*) calloc(1, sizeof(mraa_adv_func_t));
|
||||||
|
+ if (b->adv_func == NULL) {
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- strncpy(b->pins[9].name, "P9", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
- b->pins[9].gpio.pinmap = 20;
|
||||||
|
- b->pins[9].uart.parent_id = 2;
|
||||||
|
- b->pins[9].uart.mux_total = 0;
|
||||||
|
+ b->adv_func->i2c_init_pre = i2c_init_pre;
|
||||||
|
+ b->adv_func->pwm_init_post = pwm_init_post;
|
||||||
|
+ b->adv_func->spi_init_pre = spi_init_pre;
|
||||||
|
+ b->adv_func->uart_init_pre = uart_init_pre;
|
||||||
|
+ b->adv_func->gpio_init_pre = gpio_init_pre;
|
||||||
|
+ b->adv_func->i2c_set_frequency_replace = &i2c_freq;
|
||||||
|
|
||||||
|
- strncpy(b->pins[10].name, "P10", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[10].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[10].gpio.pinmap = 2;
|
||||||
|
+ b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count);
|
||||||
|
|
||||||
|
- strncpy(b->pins[11].name, "P11", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[11].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[11].gpio.pinmap = 3;
|
||||||
|
+ memset(b->pins, 0, sizeof(mraa_pininfo_t) * b->phy_pin_count);
|
||||||
|
+ memset(gpio_mux_groups, -1, sizeof(gpio_mux_groups));
|
||||||
|
|
||||||
|
- strncpy(b->pins[12].name, "P12", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[12].gpio.pinmap = 0;
|
||||||
|
+ b->adv_func->gpio_mmap_setup = &mraa_mtk_linkit_mmap_setup;
|
||||||
|
|
||||||
|
- strncpy(b->pins[13].name, "P13", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[13].gpio.pinmap = 1;
|
||||||
|
+ for (i = 0; i < b->phy_pin_count; i++) {
|
||||||
|
+ snprintf(b->pins[i].name, MRAA_PIN_NAME_SIZE, "GPIO%d", i);
|
||||||
|
+ b->pins[i].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- strncpy(b->pins[14].name, "P14", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[14].capabilites = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ strncpy(b->pins[43].name, "GPIO43", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[43].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[43].gpio.pinmap = 43;
|
||||||
|
+ gpio_mux_groups[43] = MUX_EPHY;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[20].name, "GPIO20", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[20].gpio.pinmap = 20;
|
||||||
|
+ b->pins[20].uart.parent_id = 2;
|
||||||
|
+ b->pins[20].uart.mux_total = 0;
|
||||||
|
+ b->pins[20].pwm.parent_id = 0;
|
||||||
|
+ b->pins[20].pwm.pinmap = 2;
|
||||||
|
+ gpio_mux_groups[20] = MUX_UART2;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[21].name, "GPIO21", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[21].gpio.pinmap = 21;
|
||||||
|
+ b->pins[21].uart.parent_id = 2;
|
||||||
|
+ b->pins[21].uart.mux_total = 0;
|
||||||
|
+ b->pins[21].pwm.parent_id = 0;
|
||||||
|
+ b->pins[21].pwm.pinmap = 3;
|
||||||
|
+ gpio_mux_groups[21] = MUX_UART2;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[2].name, "GPIO2", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[2].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[2].gpio.pinmap = 2;
|
||||||
|
+ gpio_mux_groups[2] = MUX_I2S;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[3].name, "GPIO3", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[3].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[3].gpio.pinmap = 3;
|
||||||
|
+ gpio_mux_groups[3] = MUX_I2S;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[0].name, "GPIO0", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[0].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[0].gpio.pinmap = 0;
|
||||||
|
+ gpio_mux_groups[0] = MUX_I2S;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[1].name, "GPIO1", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[1].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[1].gpio.pinmap = 1;
|
||||||
|
+ gpio_mux_groups[1] = MUX_I2S;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[37].name, "GPIO37", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[37].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[37].gpio.pinmap = 37;
|
||||||
|
+ gpio_mux_groups[37] = MUX_GPIO;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[44].name, "GPIO44", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[44].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[44].gpio.pinmap = 44;
|
||||||
|
+ gpio_mux_groups[44] = MUX_WLED;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[46].name, "GPIO46", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[46].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[46].gpio.pinmap = 46;
|
||||||
|
+ b->pins[46].uart.parent_id = 1;
|
||||||
|
+ b->pins[46].uart.mux_total = 0;
|
||||||
|
+ gpio_mux_groups[46] = MUX_UART1;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[45].name, "GPIO45", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[45].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[45].gpio.pinmap = 45;
|
||||||
|
+ b->pins[45].uart.parent_id = 1;
|
||||||
|
+ b->pins[45].uart.mux_total = 0;
|
||||||
|
+ gpio_mux_groups[45] = MUX_UART1;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[13].name, "GPIO13", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[13].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[13].gpio.pinmap = 13;
|
||||||
|
+ b->pins[13].uart.parent_id = 1;
|
||||||
|
+ b->pins[13].uart.mux_total = 0;
|
||||||
|
+ gpio_mux_groups[13] = MUX_UART0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[12].name, "GPIO12", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[12].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
+ b->pins[12].gpio.pinmap = 12;
|
||||||
|
+ b->pins[12].uart.parent_id = 0;
|
||||||
|
+ b->pins[12].uart.mux_total = 0;
|
||||||
|
+ gpio_mux_groups[12] = MUX_UART0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[5].name, "GPIO5", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[5].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
|
||||||
|
+ b->pins[5].gpio.pinmap = 5;
|
||||||
|
+ b->pins[5].i2c.pinmap = 0;
|
||||||
|
+ b->pins[5].i2c.mux_total = 0;
|
||||||
|
+ gpio_mux_groups[5] = MUX_I2C;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[4].name, "GPIO4", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[4].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
|
||||||
|
+ b->pins[4].gpio.pinmap = 4;
|
||||||
|
+ b->pins[4].i2c.pinmap = 0;
|
||||||
|
+ b->pins[4].i2c.mux_total = 0;
|
||||||
|
+ gpio_mux_groups[4] = MUX_I2C;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[6].name, "GPIO6", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[6].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
|
||||||
|
+ b->pins[6].gpio.pinmap = 6;
|
||||||
|
+ b->pins[6].spi.pinmap = 0;
|
||||||
|
+ b->pins[6].spi.mux_total = 0;
|
||||||
|
+ gpio_mux_groups[6] = MUX_SPI_CS1;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[7].name, "GPIO7", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[7].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 1, 0, 0, 0 };
|
||||||
|
+ b->pins[7].spi.pinmap = 0;
|
||||||
|
+ b->pins[7].spi.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[8].name, "GPIO8", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[8].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 1, 0, 0, 0 };
|
||||||
|
+ b->pins[8].spi.pinmap = 0;
|
||||||
|
+ b->pins[8].spi.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[9].name, "GPIO9", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[9].capabilites = (mraa_pincapabilities_t){ 1, 0, 0, 0, 1, 0, 0, 0 };
|
||||||
|
+ b->pins[9].spi.pinmap = 0;
|
||||||
|
+ b->pins[9].spi.mux_total = 0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[18].name, "GPIO18", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[18].gpio.pinmap = 18;
|
||||||
|
+ b->pins[18].pwm.parent_id = 0;
|
||||||
|
+ b->pins[18].pwm.pinmap = 0;
|
||||||
|
+ gpio_mux_groups[18] = MUX_PWM0;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[19].name, "GPIO19", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[19].gpio.pinmap = 19;
|
||||||
|
+ b->pins[19].pwm.parent_id = 0;
|
||||||
|
+ b->pins[19].pwm.pinmap = 1;
|
||||||
|
+ gpio_mux_groups[19] = MUX_PWM1;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[16].name, "GPIO16", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[16].gpio.pinmap = 16;
|
||||||
|
+ gpio_mux_groups[16] = MUX_SPI_S;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[17].name, "GPIO17", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[17].gpio.pinmap = 17;
|
||||||
|
+ gpio_mux_groups[17] = MUX_SPI_S;
|
||||||
|
+
|
||||||
|
+ strncpy(b->pins[14].name, "GPIO14", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ b->pins[14].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
+ b->pins[14].gpio.pinmap = 14;
|
||||||
|
+ gpio_mux_groups[14] = MUX_SPI_S;
|
||||||
|
|
||||||
|
- strncpy(b->pins[15].name, "P15", MRAA_PIN_NAME_SIZE);
|
||||||
|
+ strncpy(b->pins[15].name, "GPIO15", MRAA_PIN_NAME_SIZE);
|
||||||
|
b->pins[15].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[15].gpio.pinmap = 44;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[16].name, "P16", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[16].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
- b->pins[16].gpio.pinmap = 46;
|
||||||
|
- b->pins[16].uart.parent_id = 1;
|
||||||
|
- b->pins[16].uart.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[17].name, "P17", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[17].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
- b->pins[17].gpio.pinmap = 45;
|
||||||
|
- b->pins[17].uart.parent_id = 1;
|
||||||
|
- b->pins[17].uart.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[18].name, "P18", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[18].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
- b->pins[18].gpio.pinmap = 13;
|
||||||
|
- b->pins[18].uart.parent_id = 1;
|
||||||
|
- b->pins[18].uart.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[19].name, "P19", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[19].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 1 };
|
||||||
|
- b->pins[19].gpio.pinmap = 12;
|
||||||
|
- b->pins[19].uart.parent_id = 0;
|
||||||
|
- b->pins[19].uart.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[20].name, "P20", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[20].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
|
||||||
|
- b->pins[20].gpio.pinmap = 5;
|
||||||
|
- b->pins[20].i2c.pinmap = 0;
|
||||||
|
- b->pins[20].i2c.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[21].name, "P21", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[21].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 1, 0, 0 };
|
||||||
|
- b->pins[21].gpio.pinmap = 4;
|
||||||
|
- b->pins[21].i2c.pinmap = 0;
|
||||||
|
- b->pins[21].i2c.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[22].name, "P22", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[22].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
|
||||||
|
- b->pins[22].gpio.pinmap = 8;
|
||||||
|
- b->pins[22].spi.pinmap = 0;
|
||||||
|
- b->pins[22].spi.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[23].name, "P23", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[23].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
|
||||||
|
- b->pins[23].gpio.pinmap = 9;
|
||||||
|
- b->pins[23].spi.pinmap = 0;
|
||||||
|
- b->pins[23].spi.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[24].name, "P24", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[24].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
|
||||||
|
- b->pins[24].gpio.pinmap = 7;
|
||||||
|
- b->pins[24].spi.pinmap = 0;
|
||||||
|
- b->pins[24].spi.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[25].name, "P25", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[25].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 1, 0, 0, 0 };
|
||||||
|
- b->pins[25].gpio.pinmap = 6;
|
||||||
|
- b->pins[25].spi.pinmap = 0;
|
||||||
|
- b->pins[25].spi.mux_total = 0;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[26].name, "P26", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[26].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[26].gpio.pinmap = 18;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[27].name, "P27", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[27].capabilites = (mraa_pincapabilities_t){ 1, 1, 1, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[27].gpio.pinmap = 19;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[28].name, "P28", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[28].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[28].gpio.pinmap = 16;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[29].name, "P29", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[29].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[29].gpio.pinmap = 17;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[30].name, "P30", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[30].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[30].gpio.pinmap = 14;
|
||||||
|
-
|
||||||
|
- strncpy(b->pins[31].name, "P31", MRAA_PIN_NAME_SIZE);
|
||||||
|
- b->pins[31].capabilites = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
|
||||||
|
- b->pins[31].gpio.pinmap = 15;
|
||||||
|
+ b->pins[15].gpio.pinmap = 15;
|
||||||
|
+ gpio_mux_groups[15] = MUX_SPI_S;
|
||||||
|
|
||||||
|
// BUS DEFINITIONS
|
||||||
|
b->i2c_bus_count = 1;
|
||||||
|
b->def_i2c_bus = 0;
|
||||||
|
- b->i2c_bus[0].bus_id = 0;
|
||||||
|
- b->i2c_bus[0].sda = 20;
|
||||||
|
- b->i2c_bus[0].scl = 21;
|
||||||
|
+ b->i2c_bus[0].bus_id = 0;
|
||||||
|
+ b->i2c_bus[0].sda = 5;
|
||||||
|
+ b->i2c_bus[0].scl = 4;
|
||||||
|
|
||||||
|
b->spi_bus_count = 1;
|
||||||
|
b->def_spi_bus = 0;
|
||||||
|
- b->spi_bus[0].bus_id = 0;
|
||||||
|
- b->spi_bus[0].slave_s = 0;
|
||||||
|
- b->spi_bus[0].cs = 25;
|
||||||
|
- b->spi_bus[0].mosi = 22;
|
||||||
|
- b->spi_bus[0].miso = 23;
|
||||||
|
- b->spi_bus[0].sclk = 21;
|
||||||
|
+ b->spi_bus[0].bus_id = 32766;
|
||||||
|
+ b->spi_bus[0].slave_s = 1;
|
||||||
|
+ b->spi_bus[0].cs = 6;
|
||||||
|
+ b->spi_bus[0].mosi = 8;
|
||||||
|
+ b->spi_bus[0].miso = 9;
|
||||||
|
+ b->spi_bus[0].sclk = 7;
|
||||||
|
|
||||||
|
b->uart_dev_count = 3;
|
||||||
|
b->def_uart_dev = 0;
|
||||||
|
- b->uart_dev[0].rx = 18;
|
||||||
|
- b->uart_dev[0].tx = 19;
|
||||||
|
-
|
||||||
|
- b->uart_dev[1].rx = 16;
|
||||||
|
- b->uart_dev[1].tx = 17;
|
||||||
|
-
|
||||||
|
- b->uart_dev[2].rx = 9;
|
||||||
|
- b->uart_dev[2].tx = 8;
|
||||||
|
+ b->uart_dev[0].rx = 13;
|
||||||
|
+ b->uart_dev[0].tx = 12;
|
||||||
|
+ b->uart_dev[0].device_path = "/dev/ttyS0";
|
||||||
|
+ b->uart_dev[1].rx = 46;
|
||||||
|
+ b->uart_dev[1].tx = 45;
|
||||||
|
+ b->uart_dev[1].device_path = "/dev/ttyS1";
|
||||||
|
+ b->uart_dev[2].rx = 21;
|
||||||
|
+ b->uart_dev[2].tx = 20;
|
||||||
|
+ b->uart_dev[2].device_path = "/dev/ttyS2";
|
||||||
|
|
||||||
|
b->gpio_count = 0;
|
||||||
|
- int i;
|
||||||
|
for (i = 0; i < b->phy_pin_count; i++) {
|
||||||
|
if (b->pins[i].capabilites.gpio) {
|
||||||
|
b->gpio_count++;
|
||||||
|
--- a/src/gpio/gpio.c
|
||||||
|
+++ b/src/gpio/gpio.c
|
||||||
|
@@ -113,6 +113,8 @@
|
||||||
|
close(export);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ mraa_gpio_use_mmaped(dev, 1);
|
||||||
|
+
|
||||||
|
init_internal_cleanup:
|
||||||
|
if (status != MRAA_SUCCESS) {
|
||||||
|
if (dev != NULL)
|
|
@ -15,7 +15,7 @@ PKG_FIXUP:=autoreconf
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE_URL:=https://code.google.com/p/libnfc/
|
PKG_SOURCE_URL:=https://github.com/nfc-tools/libnfc
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_VERSION:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_VERSION:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2014 OpenWrt.org
|
# Copyright (C) 2006-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libpng
|
PKG_NAME:=libpng
|
||||||
PKG_VERSION:=1.2.52
|
PKG_VERSION:=1.2.56
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@SF/libpng
|
PKG_SOURCE_URL:=@SF/libpng
|
||||||
PKG_MD5SUM:=49d5c71929bf69a172147c47b9309fbe
|
PKG_MD5SUM:=868562bd1c58b76ed8703f135a2e439a
|
||||||
PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
|
PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
|
||||||
|
|
||||||
PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause
|
PKG_LICENSE:=Libpng GPL-2.0+ BSD-3-Clause
|
||||||
|
|
10
libs/libradcli/Config.in
Normal file
10
libs/libradcli/Config.in
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# radcli avanced configuration
|
||||||
|
|
||||||
|
menu "Configuration"
|
||||||
|
depends on PACKAGE_libradcli
|
||||||
|
|
||||||
|
config RADCLI_TLS
|
||||||
|
bool "enable TLS support"
|
||||||
|
default y
|
||||||
|
|
||||||
|
endmenu
|
75
libs/libradcli/Makefile
Normal file
75
libs/libradcli/Makefile
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=libradcli
|
||||||
|
PKG_VERSION:=1.2.5
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=radcli-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://github.com/radcli/radcli/releases/download/$(PKG_VERSION)/
|
||||||
|
PKG_MD5SUM:=b94e46e37668cc562ea5420d095a836b
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/radcli-$(PKG_VERSION)
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/libradcli
|
||||||
|
SECTION:=libs
|
||||||
|
CATEGORY:=Libraries
|
||||||
|
TITLE:=A library for radius clients
|
||||||
|
URL:=http://radcli.github.io/radcli/
|
||||||
|
MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
|
||||||
|
DEPENDS:= +RADCLI_TLS:libgnutls +libnettle
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libradcli/decription
|
||||||
|
The radcli library is a library for writing RADIUS Clients. The library's
|
||||||
|
approach is to allow writing RADIUS-aware application in less than 50 lines
|
||||||
|
of C code. It was based originally on freeradius-client and is source
|
||||||
|
compatible with it.
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS+= \
|
||||||
|
--enable-legacy-compat
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_RADCLI_TLS),y)
|
||||||
|
CONFIGURE_ARGS += --without-tls
|
||||||
|
endif
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(1)/usr/include/radcli
|
||||||
|
$(CP) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/include/radcli/radcli.h \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/include/radcli/version.h \
|
||||||
|
$(1)/usr/include/radcli
|
||||||
|
$(CP) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/include/freeradius-client.h \
|
||||||
|
$(1)/usr/include/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(CP) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/lib/libradcli.so* \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/lib/libfreeradius-client.so \
|
||||||
|
$(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libradcli/conffiles
|
||||||
|
/etc/radcli/radiusclient.conf
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libradcli/install
|
||||||
|
$(INSTALL_DIR) $(1)/etc/radcli
|
||||||
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/etc/radiusclient.conf $(1)/etc/radcli/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(CP) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/lib/libradcli.so.* \
|
||||||
|
$(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,libradcli))
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2005-2010 OpenWrt.org
|
# Copyright (C) 2014-2015 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,13 +8,13 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libseccomp
|
PKG_NAME:=libseccomp
|
||||||
PKG_VERSION:=2.2.0
|
PKG_VERSION:=2.2.1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
|
PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/
|
||||||
PKG_MD5SUM:=e9509301a1fc024cd10127ac1f31792a
|
PKG_MD5SUM:=068af8e1bc36fcd4b326ee83875ab4fd
|
||||||
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
|
PKG_MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
|
|
@ -12,7 +12,7 @@ PKG_VERSION:=1.0.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://download.libsodium.org/libsodium/releases
|
PKG_SOURCE_URL:=https://download.libsodium.org/libsodium/releases/old/unsupported
|
||||||
PKG_MD5SUM:=dc40eb23e293448c6fc908757738003f
|
PKG_MD5SUM:=dc40eb23e293448c6fc908757738003f
|
||||||
|
|
||||||
PKG_FIXUP:=libtool autoreconf
|
PKG_FIXUP:=libtool autoreconf
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libsoup
|
PKG_NAME:=libsoup
|
||||||
PKG_VERSION:=2.44.2
|
PKG_VERSION:=2.53.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.44
|
PKG_SOURCE_URL:=@GNOME/$(PKG_NAME)/2.53
|
||||||
PKG_MD5SUM:=92aa3667357157e8f3489bcca287f2fa
|
PKG_MD5SUM:=dc23612d6365a0b8a6a650ffe0bdcb4c
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
@ -42,6 +42,7 @@ define Build/Configure
|
||||||
--disable-glibtest \
|
--disable-glibtest \
|
||||||
--without-apache-httpd \
|
--without-apache-httpd \
|
||||||
--without-gnome \
|
--without-gnome \
|
||||||
|
--enable-vala=no \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014 OpenWrt.org
|
# Copyright (C) 2015 - 2018 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libssh2
|
PKG_NAME:=libssh2
|
||||||
PKG_VERSION:=1.4.3
|
PKG_VERSION:=1.6.0
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.libssh2.org/download
|
PKG_SOURCE_URL:=https://www.libssh2.org/download
|
||||||
PKG_MD5SUM:=071004c60c5d6f90354ad1b701013a0b
|
PKG_MD5SUM:=00aabd6e714a5f42a4fb82ace20db1dd
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ define Package/libssh2
|
||||||
SECTION:=libs
|
SECTION:=libs
|
||||||
CATEGORY:=Libraries
|
CATEGORY:=Libraries
|
||||||
TITLE:=SSH2 library
|
TITLE:=SSH2 library
|
||||||
URL:=http://www.libssh2.org/
|
URL:=https://www.libssh2.org/
|
||||||
DEPENDS:=+libopenssl +zlib
|
DEPENDS:=+libopenssl +zlib
|
||||||
MAINTAINER:=Jiri Slachta <slachta@cesnet.cz>
|
MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libssh2/description
|
define Package/libssh2/description
|
||||||
|
@ -39,7 +39,8 @@ TARGET_CFLAGS += $(FPIC)
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
--disable-examples-build \
|
--disable-examples-build \
|
||||||
--with-libssl-prefix=$(STAGING_DIR)/usr
|
--with-libssl-prefix=$(STAGING_DIR)/usr \
|
||||||
|
--with-libz-prefix=$(STAGING_DIR)/usr
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(1)/usr/include
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
|
|
22
libs/libssh2/patches/0004-CVE-2016-0787.patch
Normal file
22
libs/libssh2/patches/0004-CVE-2016-0787.patch
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
Description: CVE-2016-0787: Truncated Difffie-Hellman secret length
|
||||||
|
Convert bytes to bits in diffie_hellman_sha1. Otherwise we get far too
|
||||||
|
small numbers.
|
||||||
|
Origin: backport, http://www.libssh2.org/CVE-2016-0787.patch
|
||||||
|
Forwarded: not-needed
|
||||||
|
Author: Daniel Stenberg <daniel@haxx.se>
|
||||||
|
Reviewed-by: Salvatore Bonaccorso <carnil@debian.org>
|
||||||
|
Last-Update: 2016-02-18
|
||||||
|
Applied-Upstream: 1.7.0
|
||||||
|
---
|
||||||
|
|
||||||
|
--- a/src/kex.c
|
||||||
|
+++ b/src/kex.c
|
||||||
|
@@ -103,7 +103,7 @@ static int diffie_hellman_sha1(LIBSSH2_S
|
||||||
|
memset(&exchange_state->req_state, 0, sizeof(packet_require_state_t));
|
||||||
|
|
||||||
|
/* Generate x and e */
|
||||||
|
- _libssh2_bn_rand(exchange_state->x, group_order, 0, -1);
|
||||||
|
+ _libssh2_bn_rand(exchange_state->x, group_order * 8 - 1, 0, -1);
|
||||||
|
_libssh2_bn_mod_exp(exchange_state->e, g, exchange_state->x, p,
|
||||||
|
exchange_state->ctx);
|
||||||
|
|
|
@ -8,12 +8,14 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libtasn1
|
PKG_NAME:=libtasn1
|
||||||
PKG_VERSION:=4.4
|
PKG_VERSION:=4.8
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/libtasn1
|
PKG_SOURCE_URL:=ftp://ftp.gnu.org/gnu/libtasn1
|
||||||
PKG_MD5SUM:=c26d76d1309dd339365c563076599912
|
PKG_MD5SUM:=9a6767705725544f2b86670dcfb34107
|
||||||
|
PKG_LICENSE:=LGPLv2.1+
|
||||||
|
PKG_LICENSE_FILES:=COPYING.LIB
|
||||||
|
|
||||||
#PKG_FIXUP:=autoreconf
|
#PKG_FIXUP:=autoreconf
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
|
82
libs/libupm/Makefile
Normal file
82
libs/libupm/Makefile
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=libupm
|
||||||
|
PKG_VERSION:=0.4.0
|
||||||
|
|
||||||
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/intel-iot-devkit/upm.git
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_SOURCE_VERSION:=04dc6df4297a7766d6f1a8fef9699d586e7e0d92
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
|
||||||
|
PKG_LICENSE:=LGPL-2.1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
|
UPM_MODULES:= \
|
||||||
|
a110x ad8232 adafruitss adc121c021 adis16448 adxl335 adxl345 am2315 apds9002 at42qt1070 biss0001 bmpx8x buzzer \
|
||||||
|
cjq4435 ds1307 ecs1030 enc03r flex gas gp2y0a grovecircularled grovecollision groveehr groveeldriver groveelectromagnet \
|
||||||
|
groveemg grovegprs grovegsr grovelinefinder grovemd grovemoisture groveo2 grovescam grove grovespeaker grovevdiv grovewater \
|
||||||
|
grovewfs guvas12d h3lis331dl hcsr04 hm11 hmc5883l hmtrp hp20x ht9170 htu21d hx711 i2clcd ina132 isd1820 itg3200 joystick12 \
|
||||||
|
l298 ldt0028 lm35 lol loudness lpd8806 lsm303 lsm9ds0 m24lr64e max31723 max31855 max44000 max5487 maxds3231m maxsonarez \
|
||||||
|
mg811 mhz16 mic mlx90614 mma7455 mma7660 mpl3115a2 mpr121 mpu9150 mq303a my9221 nrf24l01 nrf8001 nunchuck otp538u \
|
||||||
|
pn532 ppd42ns pulsensor rfr359f rgbringcoder rotaryencoder rpr220 servo si114x sm130 st7735 stepmotor sx6119 ta12200 tcs3414cs \
|
||||||
|
th02 tm1637 tsl2561 ttp223 ublox6 uln200xa waterlevel wheelencoder wt5001 yg1006 zfm20
|
||||||
|
|
||||||
|
CMAKE_OPTIONS=-DBUILDARCH=$(CONFIG_ARCH) \
|
||||||
|
-DNODE_EXECUTABLE=$(STAGING_DIR_HOST)/bin/node \
|
||||||
|
-DSWIG_DIR=$(STAGING_DIR_HOST)/bin
|
||||||
|
|
||||||
|
define Package/libupm/Default
|
||||||
|
SECTION:=libs
|
||||||
|
CATEGORY:=Libraries
|
||||||
|
DEPENDS:=+libmraa +librt
|
||||||
|
SUBMENU:=IoT
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libupm
|
||||||
|
$(call Package/libupm/Default)
|
||||||
|
TITLE:=Intel IoT sensor library - Full
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libupm/install/Default
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/{node/,python2.7/site-packages}; \
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libupm-$(2).so* $(1)/usr/lib/; \
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/jsupm_$(2) $(1)/usr/lib/node/; \
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/python2.7/site-packages/{pyupm_$(2).py,_pyupm_$(2).so} \
|
||||||
|
$(1)/usr/lib/python2.7/site-packages/ ;
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libupm/install
|
||||||
|
$(foreach module, $(UPM_MODULES), \
|
||||||
|
$(call Package/libupm/install/Default,$(1),$(module)))
|
||||||
|
endef
|
||||||
|
|
||||||
|
define UpmPackage
|
||||||
|
define Package/libupm-$(1)
|
||||||
|
$(call Package/libupm/Default)
|
||||||
|
TITLE:=Intel IoT sensor library - $(1)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libupm-$(1)/install
|
||||||
|
$(call Package/libupm/install/Default,$$(1),$(1))
|
||||||
|
endef
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,libupm))
|
||||||
|
$(foreach package, $(UPM_MODULES), \
|
||||||
|
$(eval $(call UpmPackage,$(package))) \
|
||||||
|
$(eval $(call BuildPackage,libupm-$(package))) \
|
||||||
|
)
|
16
libs/libupm/patches/001-version.patch
Normal file
16
libs/libupm/patches/001-version.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -26,12 +26,7 @@
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
# Make a version file containing the current version from git.
|
||||||
|
-include (GetGitRevisionDescription)
|
||||||
|
-git_describe (VERSION "--tags")
|
||||||
|
-if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND")
|
||||||
|
- message (WARNING " - Install git to compile a production UPM!")
|
||||||
|
- set (VERSION "v0.4.0-dirty")
|
||||||
|
-endif ()
|
||||||
|
+set (VERSION "v0.4.0")
|
||||||
|
|
||||||
|
message (INFO " - UPM Version ${VERSION}")
|
||||||
|
|
11
libs/libupm/patches/002-at42qt1070-id.patch
Normal file
11
libs/libupm/patches/002-at42qt1070-id.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/src/at42qt1070/at42qt1070.cxx
|
||||||
|
+++ b/src/at42qt1070/at42qt1070.cxx
|
||||||
|
@@ -53,7 +53,7 @@
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (readChipID() != 0x2E) {
|
||||||
|
+ if (readChipID() != 0x1b && readChipID() != 0x2E) {
|
||||||
|
throw std::runtime_error("Chip ID does not match the expected value (2Eh)");
|
||||||
|
}
|
||||||
|
|
11
libs/libupm/patches/003-lsm303-args.patch
Normal file
11
libs/libupm/patches/003-lsm303-args.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/src/lsm303/lsm303.h
|
||||||
|
+++ b/src/lsm303/lsm303.h
|
||||||
|
@@ -34,7 +34,7 @@
|
||||||
|
|
||||||
|
/* LSM303 Address definitions */
|
||||||
|
#define LSM303_MAG 0x1E // assuming SA0 grounded
|
||||||
|
-#define LSM303_ACC 0x18 // assuming SA0 grounded
|
||||||
|
+#define LSM303_ACC 0x1E // assuming SA0 grounded
|
||||||
|
|
||||||
|
/* LSM303 Register definitions */
|
||||||
|
#define CTRL_REG1_A 0x20
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014 OpenWrt.org
|
# Copyright (C) 2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -8,12 +8,12 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libupnpp
|
PKG_NAME:=libupnpp
|
||||||
PKG_VERSION:=0.9.0
|
PKG_VERSION:=0.14.0
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://www.lesbonscomptes.com/upmpdcli/downloads
|
PKG_SOURCE_URL:=http://www.lesbonscomptes.com/upmpdcli/downloads
|
||||||
PKG_MD5SUM:=ff218bbe2df6cf70b73843d951ef838e
|
PKG_MD5SUM:=1b10905a365fc6277e1d8ced77278666
|
||||||
PKG_MAINTAINER:=Petko Bordjukov <bordjukov@gmail.com>
|
PKG_MAINTAINER:=Petko Bordjukov <bordjukov@gmail.com>
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
@ -39,14 +39,13 @@ define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(1)/usr/include
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/libupnpp $(1)/usr/include/
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/libupnpp $(1)/usr/include/
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp-$(PKG_VERSION).so* $(1)/usr/lib/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.so* $(1)/usr/lib/
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.{so,la} $(1)/usr/lib/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.la $(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/libupnpp/install
|
define Package/libupnpp/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp-$(PKG_VERSION).so.* $(1)/usr/lib/
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.so.* $(1)/usr/lib/
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libupnpp.so $(1)/usr/lib/
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,libupnpp))
|
$(eval $(call BuildPackage,libupnpp))
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libuv
|
PKG_NAME:=libuv
|
||||||
PKG_VERSION:=1.4.2
|
PKG_VERSION:=1.9.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
@ -16,8 +16,8 @@ PKG_LICENSE_FILES:=LICENSE
|
||||||
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://libuv.org/dist/v$(PKG_VERSION)/
|
PKG_SOURCE_URL:=https://dist.libuv.org/dist/v$(PKG_VERSION)/
|
||||||
PKG_MD5SUM:=d116fbe695157b799fb8805477e24eff
|
PKG_MD5SUM:=654bf6783ac7fc10435c84ec86720a6e
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2015 OpenWrt.org
|
# Copyright (C) 2006-2016 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -13,7 +13,7 @@ PKG_VERSION:=1.0.3-$(PKG_REV)
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL:=git://git.xiph.org/tremor.git
|
PKG_SOURCE_URL:=https://git.xiph.org/tremor.git
|
||||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
PKG_SOURCE_VERSION:=b56ffce0c0773ec5ca04c466bc00b1bbcaf65aef
|
PKG_SOURCE_VERSION:=b56ffce0c0773ec5ca04c466bc00b1bbcaf65aef
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2014 OpenWrt.org
|
# Copyright (C) 2014 - 2018 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=libxslt
|
PKG_NAME:=libxslt
|
||||||
PKG_VERSION:=1.1.28
|
PKG_VERSION:=1.1.28
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:= \
|
PKG_SOURCE_URL:= \
|
||||||
|
@ -20,7 +20,7 @@ PKG_MD5SUM:=9667bf6f9310b957254fdcf6596600b7
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
||||||
PKG_MAINTAINER:=Jiri Slachta <slachta@cesnet.cz>
|
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
@ -43,7 +43,7 @@ define Package/libexslt
|
||||||
SECTION:=libs
|
SECTION:=libs
|
||||||
CATEGORY:=Libraries
|
CATEGORY:=Libraries
|
||||||
DEPENDS:=+libxslt
|
DEPENDS:=+libxslt
|
||||||
TITLE:=Gnome XSLT library Extention
|
TITLE:=Gnome XSLT library Extension
|
||||||
URL:=http://xmlsoft.org/XSLT/EXSLT/
|
URL:=http://xmlsoft.org/XSLT/EXSLT/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -64,6 +64,7 @@ define Package/xsltproc/description
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
|
--disable-silent-rules \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--enable-static \
|
--enable-static \
|
||||||
--without-python \
|
--without-python \
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
From: Daniel Veillard <veillard@redhat.com>
|
||||||
|
Date: Wed, 30 Jan 2013 16:31:37 +0000
|
||||||
|
Subject: Fix a couple of places where (f)printf parameters were broken
|
||||||
|
|
||||||
|
As reported by Thomas Jarosch <thomas.jarosch@intra2net.com>
|
||||||
|
---
|
||||||
|
python/libxslt.c | 10 +++++-----
|
||||||
|
xsltproc/xsltproc.c | 2 +-
|
||||||
|
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/python/libxslt.c b/python/libxslt.c
|
||||||
|
index 6a4f1c3..8dd6c78 100644
|
||||||
|
--- a/python/libxslt.c
|
||||||
|
+++ b/python/libxslt.c
|
||||||
|
@@ -356,15 +356,15 @@ libxslt_xsltRegisterExtModuleElement(PyObject *self ATTRIBUTE_UNUSED,
|
||||||
|
PyObject *pyobj_element_f;
|
||||||
|
PyObject *pyobj_precomp_f;
|
||||||
|
|
||||||
|
-#ifdef DEBUG_EXTENSIONS
|
||||||
|
- printf("libxslt_xsltRegisterExtModuleElement called\n",
|
||||||
|
- name, ns_uri);
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
if (!PyArg_ParseTuple(args, (char *)"szOO:registerExtModuleElement",
|
||||||
|
&name, &ns_uri, &pyobj_precomp_f, &pyobj_element_f))
|
||||||
|
return(NULL);
|
||||||
|
|
||||||
|
+#ifdef DEBUG_EXTENSIONS
|
||||||
|
+ printf("libxslt_xsltRegisterExtModuleElement called: %s %s\n",
|
||||||
|
+ name, ns_uri);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
if ((name == NULL) || (pyobj_element_f == NULL) || (pyobj_precomp_f == NULL)) {
|
||||||
|
py_retval = libxml_intWrap(-1);
|
||||||
|
return(py_retval);
|
||||||
|
diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c
|
||||||
|
index 9ec4b76..33beddf 100644
|
||||||
|
--- a/xsltproc/xsltproc.c
|
||||||
|
+++ b/xsltproc/xsltproc.c
|
||||||
|
@@ -319,7 +319,7 @@ static void endTimer(char *format, ...)
|
||||||
|
va_start(ap, format);
|
||||||
|
vfprintf(stderr,format,ap);
|
||||||
|
va_end(ap);
|
||||||
|
- fprintf(stderr, " was not timed\n", msec);
|
||||||
|
+ fprintf(stderr, " was not timed\n");
|
||||||
|
#else
|
||||||
|
/* We don't have gettimeofday, time or stdarg.h, what crazy world is
|
||||||
|
* this ?!
|
|
@ -0,0 +1,56 @@
|
||||||
|
From: Nils Werner <wernerns@iis.fraunhofer.de>
|
||||||
|
Date: Thu, 24 Jan 2013 18:44:03 +0000
|
||||||
|
Subject: Initialize pseudo random number generator with current time or
|
||||||
|
optional command line parameter
|
||||||
|
|
||||||
|
---
|
||||||
|
xsltproc/xsltproc.c | 15 +++++++++++++++
|
||||||
|
1 file changed, 15 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c
|
||||||
|
index 33beddf..7d1fe61 100644
|
||||||
|
--- a/xsltproc/xsltproc.c
|
||||||
|
+++ b/xsltproc/xsltproc.c
|
||||||
|
@@ -514,6 +514,7 @@ static void usage(const char *name) {
|
||||||
|
printf("\t--maxdepth val : increase the maximum depth (default %d)\n", xsltMaxDepth);
|
||||||
|
printf("\t--maxvars val : increase the maximum variables (default %d)\n", xsltMaxVars);
|
||||||
|
printf("\t--maxparserdepth val : increase the maximum parser depth\n");
|
||||||
|
+ printf("\t--seed-rand val : initialize pseudo random number generator with specific seed\n");
|
||||||
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
|
printf("\t--html: the input document is(are) an HTML file(s)\n");
|
||||||
|
#endif
|
||||||
|
@@ -556,6 +557,7 @@ main(int argc, char **argv)
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ srand(time(NULL));
|
||||||
|
xmlInitMemory();
|
||||||
|
|
||||||
|
LIBXML_TEST_VERSION
|
||||||
|
@@ -750,6 +752,15 @@ main(int argc, char **argv)
|
||||||
|
if (value > 0)
|
||||||
|
xmlParserMaxDepth = value;
|
||||||
|
}
|
||||||
|
+ } else if ((!strcmp(argv[i], "-seed-rand")) ||
|
||||||
|
+ (!strcmp(argv[i], "--seed-rand"))) {
|
||||||
|
+ int value;
|
||||||
|
+
|
||||||
|
+ i++;
|
||||||
|
+ if (sscanf(argv[i], "%d", &value) == 1) {
|
||||||
|
+ if (value > 0)
|
||||||
|
+ srand(value);
|
||||||
|
+ }
|
||||||
|
} else if ((!strcmp(argv[i],"-dumpextensions"))||
|
||||||
|
(!strcmp(argv[i],"--dumpextensions"))) {
|
||||||
|
dumpextensions++;
|
||||||
|
@@ -786,6 +797,10 @@ main(int argc, char **argv)
|
||||||
|
(!strcmp(argv[i], "--maxparserdepth"))) {
|
||||||
|
i++;
|
||||||
|
continue;
|
||||||
|
+ } else if ((!strcmp(argv[i], "-seed-rand")) ||
|
||||||
|
+ (!strcmp(argv[i], "--seed-rand"))) {
|
||||||
|
+ i++;
|
||||||
|
+ continue;
|
||||||
|
} else if ((!strcmp(argv[i], "-o")) ||
|
||||||
|
(!strcmp(argv[i], "-output")) ||
|
||||||
|
(!strcmp(argv[i], "--output"))) {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue