diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b69f01e..0000000 --- a/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/i2c-0.1.3.tgz -/i2c-0.1.4.tgz -/i2c-0.2.1.tgz -/i2c-0.2.3.tgz diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 12376d9..0000000 --- a/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2013, Kelly Korevec -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the author nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..5204a84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Orphaned for 6+ weeks diff --git a/nodejs-i2c-node12.patch b/nodejs-i2c-node12.patch deleted file mode 100644 index e32acae..0000000 --- a/nodejs-i2c-node12.patch +++ /dev/null @@ -1,250 +0,0 @@ -commit 1b3d14846e245a541bd7132c96dfeb56cc64b1b1 -Author: Tom Hughes -Date: Thu Jun 20 14:01:15 2019 +0100 - - Update for Node.js 12.x support - -diff --git a/src/i2c.cc b/src/i2c.cc -index c7d4bee..968d5fb 100644 ---- a/src/i2c.cc -+++ b/src/i2c.cc -@@ -35,7 +35,7 @@ void SetAddress(const Nan::FunctionCallbackInfo& info) { - Nan::ThrowTypeError("addr must be an int"); - return; - } -- addr = info[0]->Int32Value(); -+ addr = Nan::To(info[0]).ToChecked(); - setAddress(addr); - } - -@@ -57,15 +57,16 @@ void Scan(const Nan::FunctionCallbackInfo& info) { - if (res >= 0) { - res = i; - } -- results->Set(i, Nan::New(res)); -+ Nan::Set(results, i, Nan::New(res)); - } - - setAddress(addr); - - const unsigned argc = 2; - Local argv[argc] = { err, results }; -+ Nan::AsyncResource ar("Scan"); - -- Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv); -+ ar.runInAsyncScope(Nan::GetCurrentContext()->Global(), callback, argc, argv); - - info.GetReturnValue().Set(results); - } -@@ -81,7 +82,7 @@ void Close(const Nan::FunctionCallbackInfo& info) { - void Open(const Nan::FunctionCallbackInfo& info) { - Nan::HandleScope scope; - -- String::Utf8Value device(info[0]); -+ Nan::Utf8String device(info[0]); - Local err = Nan::New(Nan::Null()); - - fd = open(*device, O_RDWR); -@@ -93,14 +94,16 @@ void Open(const Nan::FunctionCallbackInfo& info) { - const unsigned argc = 1; - Local callback = Local::Cast(info[1]); - Local argv[argc] = { err }; -- Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv); -+ Nan::AsyncResource ar("Open"); -+ -+ ar.runInAsyncScope(Nan::GetCurrentContext()->Global(), callback, argc, argv); - } - } - - void Read(const Nan::FunctionCallbackInfo& info) { - Nan::HandleScope scope; - -- int len = info[0]->Int32Value(); -+ int len = Nan::To(info[0]).ToChecked(); - - Local data = Nan::New(); - -@@ -111,7 +114,7 @@ void Read(const Nan::FunctionCallbackInfo& info) { - err = Nan::Error(Nan::New("Cannot read from device").ToLocalChecked()); - } else { - for (int i = 0; i < len; ++i) { -- data->Set(i, Nan::New(buf[i])); -+ Nan::Set(data, i, Nan::New(buf[i])); - } - } - delete[] buf; -@@ -120,7 +123,9 @@ void Read(const Nan::FunctionCallbackInfo& info) { - const unsigned argc = 2; - Local callback = Local::Cast(info[1]); - Local argv[argc] = { err, data }; -- Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv); -+ Nan::AsyncResource ar("Read"); -+ -+ ar.runInAsyncScope(Nan::GetCurrentContext()->Global(), callback, argc, argv); - } - } - -@@ -142,7 +147,9 @@ void ReadByte(const Nan::FunctionCallbackInfo& info) { - const unsigned argc = 2; - Local callback = Local::Cast(info[0]); - Local argv[argc] = { err, data }; -- Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv); -+ Nan::AsyncResource ar("ReadByte"); -+ -+ ar.runInAsyncScope(Nan::GetCurrentContext()->Global(), callback, argc, argv); - } - - info.GetReturnValue().Set(data); -@@ -151,8 +158,8 @@ void ReadByte(const Nan::FunctionCallbackInfo& info) { - void ReadBlock(const Nan::FunctionCallbackInfo& info) { - Nan::HandleScope scope; - -- int8_t cmd = info[0]->Int32Value(); -- int32_t len = info[1]->Int32Value(); -+ int8_t cmd = Nan::To(info[0]).ToChecked(); -+ int32_t len = Nan::To(info[1]).ToChecked(); - uint8_t data[len]; - Local err = Nan::New(Nan::Null()); - // Local buffer = node::Buffer::New(len); -@@ -171,11 +178,13 @@ void ReadBlock(const Nan::FunctionCallbackInfo& info) { - const unsigned argc = 2; - Local callback = Local::Cast(info[3]); - Local argv[argc] = { err, buffer }; -- Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv); -+ Nan::AsyncResource ar("ReadBlock"); -+ -+ ar.runInAsyncScope(Nan::GetCurrentContext()->Global(), callback, argc, argv); - } - - if (info[2]->IsNumber()) { -- int32_t delay = info[2]->Int32Value(); -+ int32_t delay = Nan::To(info[2]).ToChecked(); - usleep(delay * 1000); - } else { - break; -@@ -190,8 +199,8 @@ void Write(const Nan::FunctionCallbackInfo& info) { - - Local buffer = info[0]; - -- int len = node::Buffer::Length(buffer->ToObject()); -- char* data = node::Buffer::Data(buffer->ToObject()); -+ int len = node::Buffer::Length(Nan::To(buffer).ToLocalChecked()); -+ char* data = node::Buffer::Data(Nan::To(buffer).ToLocalChecked()); - - Local err = Nan::New(Nan::Null()); - -@@ -203,14 +212,16 @@ void Write(const Nan::FunctionCallbackInfo& info) { - const unsigned argc = 1; - Local callback = Local::Cast(info[1]); - Local argv[argc] = { err }; -- Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv); -+ Nan::AsyncResource ar("Write"); -+ -+ ar.runInAsyncScope(Nan::GetCurrentContext()->Global(), callback, argc, argv); - } - } - - void WriteByte(const Nan::FunctionCallbackInfo& info) { - Nan::HandleScope scope; - -- int8_t byte = info[0]->Int32Value(); -+ int8_t byte = Nan::To(info[0]).ToChecked(); - Local err = Nan::New(Nan::Null()); - - if (i2c_smbus_write_byte(fd, byte) == -1) { -@@ -221,7 +232,9 @@ void WriteByte(const Nan::FunctionCallbackInfo& info) { - const unsigned argc = 1; - Local callback = Local::Cast(info[1]); - Local argv[argc] = { err }; -- Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv); -+ Nan::AsyncResource ar("WriteByte"); -+ -+ ar.runInAsyncScope(Nan::GetCurrentContext()->Global(), callback, argc, argv); - } - } - -@@ -229,9 +242,9 @@ void WriteBlock(const Nan::FunctionCallbackInfo& info) { - Nan::HandleScope scope; - - Local buffer = info[1]; -- int8_t cmd = info[0]->Int32Value(); -- int len = node::Buffer::Length(buffer->ToObject()); -- char* data = node::Buffer::Data(buffer->ToObject()); -+ int8_t cmd = Nan::To(info[0]).ToChecked(); -+ int len = node::Buffer::Length(Nan::To(buffer).ToLocalChecked()); -+ char* data = node::Buffer::Data(Nan::To(buffer).ToLocalChecked()); - - Local err = Nan::New(Nan::Null()); - -@@ -243,15 +256,17 @@ void WriteBlock(const Nan::FunctionCallbackInfo& info) { - const unsigned argc = 1; - Local callback = Local::Cast(info[2]); - Local argv[argc] = { err }; -- Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv); -+ Nan::AsyncResource ar("WriteBlock"); -+ -+ ar.runInAsyncScope(Nan::GetCurrentContext()->Global(), callback, argc, argv); - } - } - - void WriteWord(const Nan::FunctionCallbackInfo& info) { - Nan::HandleScope scope; - -- int8_t cmd = info[0]->Int32Value(); -- int16_t word = info[1]->Int32Value(); -+ int8_t cmd = Nan::To(info[0]).ToChecked(); -+ int16_t word = Nan::To(info[1]).ToChecked(); - - Local err = Nan::New(Nan::Null()); - -@@ -263,33 +278,25 @@ void WriteWord(const Nan::FunctionCallbackInfo& info) { - const unsigned argc = 1; - Local callback = Local::Cast(info[2]); - Local argv[argc] = { err }; -- Nan::MakeCallback(Nan::GetCurrentContext()->Global(), callback, argc, argv); -+ Nan::AsyncResource ar("WriteWord"); -+ -+ ar.runInAsyncScope(Nan::GetCurrentContext()->Global(), callback, argc, argv); - } - } - --void Init(Handle exports) { -- -- exports->Set(Nan::New("setAddress").ToLocalChecked(), -- Nan::New(SetAddress)->GetFunction()); -- exports->Set(Nan::New("scan").ToLocalChecked(), -- Nan::New(Scan)->GetFunction()); -- exports->Set(Nan::New("open").ToLocalChecked(), -- Nan::New(Open)->GetFunction()); -- exports->Set(Nan::New("close").ToLocalChecked(), -- Nan::New(Close)->GetFunction()); -- exports->Set(Nan::New("write").ToLocalChecked(), -- Nan::New(Write)->GetFunction()); -- exports->Set(Nan::New("writeByte").ToLocalChecked(), -- Nan::New(WriteByte)->GetFunction()); -- exports->Set(Nan::New("writeBlock").ToLocalChecked(), -- Nan::New(WriteBlock)->GetFunction()); -- exports->Set(Nan::New("read").ToLocalChecked(), -- Nan::New(Read)->GetFunction()); -- exports->Set(Nan::New("readByte").ToLocalChecked(), -- Nan::New(ReadByte)->GetFunction()); -- exports->Set(Nan::New("readBlock").ToLocalChecked(), -- Nan::New(ReadBlock)->GetFunction()); -+NAN_MODULE_INIT(Init) { -+ -+ Nan::Export(target, "setAddress", SetAddress); -+ Nan::Export(target, "scan", Scan); -+ Nan::Export(target, "open", Open); -+ Nan::Export(target, "close", Close); -+ Nan::Export(target, "write", Write); -+ Nan::Export(target, "writeByte", WriteByte); -+ Nan::Export(target, "writeBlock", WriteBlock); -+ Nan::Export(target, "read", Read); -+ Nan::Export(target, "readByte", ReadByte); -+ Nan::Export(target, "readBlock", ReadBlock); - - } - --NODE_MODULE(i2c, Init) -\ No newline at end of file -+NAN_MODULE_WORKER_ENABLED(i2c, Init) diff --git a/nodejs-i2c.spec b/nodejs-i2c.spec deleted file mode 100644 index 2c2d491..0000000 --- a/nodejs-i2c.spec +++ /dev/null @@ -1,195 +0,0 @@ -%{?nodejs_find_provides_and_requires} - -Name: nodejs-i2c -Version: 0.2.3 -Release: 19%{?dist} -Summary: Node.js native bindings for i2c-dev -# package.json indicates BSD, but no license file included -# upstream notified in https://github.com/korevec/node-i2c/pull/9 -# we're including a copy of the BSD license in order to comply with the terms of -# the BSD license, as required by: -# https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text -# -# src/i2c-dev.(cc|h) are GPLv2+, everything else is BSD -License: BSD and GPLv2+ -URL: https://github.com/korevec/node-i2c -Source0: https://registry.npmjs.org/i2c/-/i2c-%{version}.tgz -# Update for Node.js 12.x support -Patch0: nodejs-i2c-node12.patch -ExclusiveArch: %{nodejs_arches} - -BuildRequires: nodejs-devel -BuildRequires: node-gyp - -BuildRequires: npm(nan) >= 2.3.5 -BuildRequires: npm(coffee-script) -BuildRequires: npm(underscore) - -%description -%{summary}. - -Plays well with Raspberry Pi and Beaglebone. - - -%prep -%autosetup -p1 -n package -%nodejs_fixdep --dev --move nan -%nodejs_fixdep bindings "^1.2.1" -%nodejs_fixdep coffee-script "^1.9.1" -%nodejs_fixdep underscore "^1.8.2" - - -%build -%nodejs_symlink_deps --build -%set_build_flags -node-gyp rebuild - - -%install -mkdir -p %{buildroot}%{nodejs_sitelib}/i2c -cp -pr lib main.js package.json %{buildroot}%{nodejs_sitelib}/i2c -mkdir -p %{buildroot}%{nodejs_sitelib}/i2c/build/Release -cp -pr build/Release/i2c.node %{buildroot}%{nodejs_sitelib}/i2c/build/Release -chmod 0755 %{buildroot}%{nodejs_sitelib}/i2c/build/Release/i2c.node -%nodejs_symlink_deps - - -%check -%nodejs_symlink_deps --check -%__nodejs -e "require('./')" - - -%files -%doc README.md examples -%license LICENSE -%{nodejs_sitelib}/i2c - - -%changelog -* Sat Aug 01 2020 Fedora Release Engineering - 0.2.3-19 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 0.2.3-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jun 29 2020 Tom Hughes - 0.2.3-17 -- Rebuild for Node.js 14.4.0 - -* Wed Jan 29 2020 Fedora Release Engineering - 0.2.3-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jul 25 2019 Fedora Release Engineering - 0.2.3-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Jun 14 2019 Tom Hughes - 0.2.3-14 -- Rebuild for Node.js 12.4.0 - -* Fri Feb 01 2019 Fedora Release Engineering - 0.2.3-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 0.2.3-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Jun 22 2018 Tom Hughes - 0.2.3-11 -- Rebuild for Node.js 10.5.0 - -* Thu Mar 8 2018 Tom Hughes - 0.2.3-9 -- Relax npm(bindings) dependency - -* Thu Feb 08 2018 Fedora Release Engineering - 0.2.3-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Jan 23 2018 Tom Hughes - 0.2.3-7 -- Export CFLAGS to get standard optimisation flags -- Export LDFLAGS for hardened build support -- Allow undefined symbols in the shared object - -* Thu Aug 10 2017 Tom Hughes - 0.2.3-6.1 -- Rebuild for Node.js 8.3.0 - -* Thu Aug 03 2017 Fedora Release Engineering - 0.2.3-5.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.2.3-4.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Wed Jun 28 2017 Tom Hughes - 0.2.3-3.1 -- Rebuild for Node.js 8.1.2 - -* Fri Feb 10 2017 Fedora Release Engineering - 0.2.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Mon Aug 29 2016 Tom Hughes - 0.2.3-2 -- Rebuild for Node.js 6.5.0 - -* Thu Jun 16 2016 Tom Hughes - 0.2.3-1 -- Update to 0.2.3 upstream release - -* Mon May 09 2016 Stephen Gallagher - 0.2.1-6.1 -- Rebuild for Node.js 6.1.0 upgrade - -* Tue Mar 29 2016 Tom Hughes - 0.2.1-6 -- Rebuild for Node.js 5.x - -* Wed Mar 23 2016 Tom Hughes - 0.2.1-5 -- Rebuild for Node.js 4.4.x - -* Wed Feb 10 2016 Tom Hughes - 0.2.1-4 -- Rebuild for Node.js 4.3.x - -* Thu Feb 04 2016 Fedora Release Engineering - 0.2.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jan 19 2016 Stephen Gallagher - 0.2.1-2 -- Rebuild against the correct nodejs(abi) - -* Wed Dec 2 2015 Tom Hughes - 0.2.1-1 -- Update to 0.2.1 upstream release -- Patch for nodejs 4.2 support - -* Wed Jun 17 2015 Fedora Release Engineering - 0.1.4-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat May 02 2015 Kalev Lember - 0.1.4-12 -- Rebuilt for GCC 5 C++11 ABI change - -* Sun Aug 17 2014 Fedora Release Engineering - 0.1.4-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sat Jun 07 2014 Fedora Release Engineering - 0.1.4-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sun Apr 20 2014 Jamie Nguyen - 0.1.4-9 -- fix version of npm(underscore) dependency - -* Sun Apr 20 2014 Jamie Nguyen - 0.1.4-8 -- put nodejs_default_filter before nodejs_find_provides_and_requires - -* Sun Apr 20 2014 Jamie Nguyen - 0.1.4-7 -- fix version of npm(bindings) dependency - -* Fri Apr 18 2014 Jamie Nguyen - 0.1.4-6 -- fix version of npm(underscore) dependency - -* Fri Feb 14 2014 T.C. Hollingsworth - 0.1.4-5 -- rebuild for icu-53 (via v8) - -* Sun Jan 19 2014 T.C. Hollingsworth - 0.1.4-4 -- fix underscore for 1.5.1 - -* Sat Aug 03 2013 Fedora Release Engineering - 0.1.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Sat Jul 13 2013 Jamie Nguyen - 0.1.4-2 -- add macro for Provides and Requires - -* Wed Jul 10 2013 Jamie Nguyen - 0.1.4-1 -- update to upstream release 0.1.4 -- fix version of coffee-script dependency - -* Wed Jun 26 2013 T.C. Hollingsworth - 0.1.3-2 -- fix permissions on shared object - -* Fri Jun 21 2013 T.C. Hollingsworth - 0.1.3-1 -- initial package diff --git a/sources b/sources deleted file mode 100644 index 55417c0..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -dc38810f1422e8a741ec09e7df34048a i2c-0.2.3.tgz